simplify VLOOKUP with conditions
If you posted some sample data it would help!
Biff
"tjtjjtjt" wrote in message
...
I wrote this funciton as a quick fix for a collegue.
It looks for a comma in the cell.
No comma = standard VLOOKUP
Comma = concatenate 2 VLOOKUPs
I would like to make the formula flexible enough to handle more than 1
comma
and to handle situations when there is a slash instead of a comma.
=IF(ISERROR(FIND(",",C4,1)),VLOOKUP(C4,Cat!$A$2:$B $129,2,FALSE),VLOOKUP(LEFT(C4,(FIND(",",C4,1)-1)),Cat!$A$2:$B$129,2,FALSE)&",
"&VLOOKUP(MID(C4,FIND(",",C4,1)+1,255),Cat!$A$2:$B $129,2,FALSE))
--
tj
|