Reply to Message

Solution (hack)
I found a solution to my problem (and yours):

=IF(FIND(".",CONCATENATE(C3,".")) =LEN(C3),MID(C3, 1, FIND(".",C3)-1),C3)

Where C3 is the field you care about. Basically, if the character you're looking for (in your case "-", in mine, ".") isn't in the string, you get #VALUE! and that cascades through all other Excel functions and screws everything up, right? So you make sure the character is in there. You CONCATENATE(C3, "."), i.e., stick the character at the end. Then if FIND or SEARCH returns LEN(C3) + 1, you know that the character was originally missing from the string. So that becomes the basis for your comparison. It's ugly, but it works.

In the scenario being used in this article, the formula would instead be:

=IF(FIND("-",CONCATENATE(C3,"-")) = LEN(C3), MID(C3, FIND("-", C3) + 1, 2), "")

(Tested in Excel 2003 SP3)
Posted by insignis@...
Updated - 3rd Oct 2007