#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Comparison Formula

its perfect !
thanks!
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Comparison Formula Webtek Excel Discussion (Misc queries) 0 March 28th 07 02:53 AM
Need Comparison Formula ufo_pilot Excel Discussion (Misc queries) 0 March 28th 07 01:59 AM
Need Comparison Formula Max Excel Discussion (Misc queries) 0 March 28th 07 01:16 AM
Comparison Formula [email protected] Excel Worksheet Functions 3 March 11th 06 02:55 AM
formula for comparison sweetsue516 Excel Discussion (Misc queries) 2 August 31st 05 05:09 PM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"