| DoIf (Operation, ListIn, [ListOut], Criteria, [CritOpts], [DefValOnErr]) | | Do an operation, such as SUMIF, across several sheets | | | | Pro | Whats good or unique about it | DoIf is currently (August 2006) the only function in the BF library that can deal with Multi-Sheet references, such as "Sheet1:Sheet3!D5". This means that the Operation it does, and the most common is SUMIF, can be done across sveral sheets, giving it unique functionality. Excel really lacks the ability to do anything across sheets, and most functions cannot cope with multi-sheet references, with the notable exception of SUM(). Unfortunately, Excel"s SUMIF() won"t work across sheets, which is where ?DoIf is particularly useful. If we tell you why Excel doesn"t do multi-sheet references you will understand the issue more. Excel"s basic cell storage mechanism doesn"t understand multi sheet references as described previously - internally it assumes that a cell reference has a single sheet that it refers to, so multi-sheet references just aren"t in its vocabulary. We don"t know how SUM() does it, actually. DoIf has to re-parse the entire formula string of the cell, to pick out its own arguments, and with the help of Excel"s parser, interpret them. That is why currently you can only have one DoIf in a cell - we just weren"t clever enough to write a multi-function parser. Its also why you should watch the performance of this function a bit, particularly over long sheet ranges - although so far it has appeared to us to be quite fast. | Example DoIf.xls |
Any comments on this documentation? Send us your suggestions below. |