Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparison Formula
I have a day entered in cell E2, and i am trying to write a formula to
return "T" if E2 is any value from Monday-Friday and "F" if not. =IF(E2=OR("Monday","Tuesday","Wednesday","Thursday ","Friday"),"T","F") Could you tell me what's wrong with the above formula and how to correct it. thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparison Formula
On Sat, 31 Jan 2009 12:52:34 -0800 (PST), Savio
wrote: I have a day entered in cell E2, and i am trying to write a formula to return "T" if E2 is any value from Monday-Friday and "F" if not. =IF(E2=OR("Monday","Tuesday","Wednesday","Thursda y","Friday"),"T","F") Could you tell me what's wrong with the above formula and how to correct it. thanks Try this: =IF(OR(E2="Monday",E2="Tuesday",E2="Wednesday",E2= "Thursday",E2="Friday"),"T","F") Hope this helps / Lars-Åke |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparison Formula
If you want the formula shorter, I expect you could use:
=if(or(e2="Saturday",e2="Sunday"),"F","T") Regards, Fred. "Savio" wrote in message ... I have a day entered in cell E2, and i am trying to write a formula to return "T" if E2 is any value from Monday-Friday and "F" if not. =IF(E2=OR("Monday","Tuesday","Wednesday","Thursday ","Friday"),"T","F") Could you tell me what's wrong with the above formula and how to correct it. thanks |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparison Formula
its perfect !
thanks! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparison Formula
On Sat, 31 Jan 2009 20:56:48 GMT, Lars-Åke Aspelin
wrote: On Sat, 31 Jan 2009 12:52:34 -0800 (PST), Savio wrote: I have a day entered in cell E2, and i am trying to write a formula to return "T" if E2 is any value from Monday-Friday and "F" if not. =IF(E2=OR("Monday","Tuesday","Wednesday","Thursd ay","Friday"),"T","F") Could you tell me what's wrong with the above formula and how to correct it. thanks Try this: =IF(OR(E2="Monday",E2="Tuesday",E2="Wednesday",E2 ="Thursday",E2="Friday"),"T","F") Hope this helps / Lars-Åke A bit shorter: =IF(OR(E2={"Monday","Tuesday","Wednesday","Thursda y","Friday"}),"T","F") / Lars-Åke |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparison Formula
For this to work you have assumed that E2 always holds a name of a day
and is never blank. That was not stated but can of course be true. If that is the case, this formula is even shorter: =IF(LEFT(E2,1)="S","F","T") Lars-Åke On Sat, 31 Jan 2009 15:04:20 -0600, "Fred Smith" wrote: If you want the formula shorter, I expect you could use: =if(or(e2="Saturday",e2="Sunday"),"F","T") Regards, Fred. "Savio" wrote in message ... I have a day entered in cell E2, and i am trying to write a formula to return "T" if E2 is any value from Monday-Friday and "F" if not. =IF(E2=OR("Monday","Tuesday","Wednesday","Thursday ","Friday"),"T","F") Could you tell me what's wrong with the above formula and how to correct it. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need Comparison Formula | Excel Discussion (Misc queries) | |||
Need Comparison Formula | Excel Discussion (Misc queries) | |||
Need Comparison Formula | Excel Discussion (Misc queries) | |||
Comparison Formula | Excel Worksheet Functions | |||
formula for comparison | Excel Discussion (Misc queries) |