View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default If Then assistance...

This formula returns the number index of the color in F2
.....or zero if F2 is either blank or contains invalid text:

G2: =MAX(COUNTIF(F2,{"blue","red","green","yellow"})*{ 1,2,3,4})

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Murph" wrote in message
...
I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then
input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3,
yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.