Hi,
Let's assume SUMIF does not exist ...
Could a UDF replicate exactly SUMIF ?
With MySumIf (range, criteria, sumrange) as a reference "UDF Mold" , this would allow to design twisted UDFs for very specific needs.
It is mainly the way to handle the behaviour of the criteria which looks like a headache ...
Thanks a lot for your insight
I'm not sure as of which version SUMIF was first introduced but the simplest way is to understand how it works and then you can write your own custom function for it. Of course this also depends on your own coding experience and knoledge but don't let that hold you back since VBA coding is in essential the same as telling the macro what you want to do
This link explains the SUMIF and SUMIFS funtions
Excel SUMIF and SUMIFS – Explained
Maybe it helps
Hi,
Thanks a lot for the explanation on how to use SUMIF
But my objective is to replicate exactly the way SUMIF operates with a tailor-made UDF.
The main obstacle is to deal with criteria and their operators (=,<,>,<>) which can be potentially included in the definition of the criteria ...
Well, you coul start with recording a macro and then edit it to your needs.
That way you can see how the code is built up.
What's you excel version?