#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default IF OR Formula

In column "G" I have imported dates formatted as such...11/09/2009 9:58:00 AM

I'm in accounting so we go by fiscal month i.e. 10/24/09 thru 11/27/09 is
November

I'm looking for a formula that will tell me what month the date falls in.

I tried this...(not working)
=IF(OR(G7="09/26/2009","October",IF(G7<="10/23/09","October",IF(G7="10/24/2009","November",IF(G7<="11/27/09","November",IF(G7="11/28/09","December",IF(G7="12/31/2009","December",FALSE)))))))

I'm not sure if I'm even on the right track.

Please help

Thank you,
T
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default IF OR Formula

I assume you have proper dates. Your formula is comparing them with
text values, and you also have the logic wrong. Try this approach:

=IF(AND(G7=--"09/26/2009",G7<=--"10/23/09"),"October",IF(AND
(G7=--"10/24*/2009,G7<=--"11/27/09"),"November",IF(AND
(G7=--"11/28/09",G7<=--"12/31/2009"),"December",FALSE)))

The double unary minus -- converts those text values to proper dates.
Also, you want the date to be later than the start date AND earlier
than the end date for each period.

Hope this helps.

Pete

On Dec 3, 9:05*pm, tsmith wrote:
In column "G" I have imported dates formatted as such...11/09/2009 9:58:00 AM

I'm in accounting so we go by fiscal month i.e. 10/24/09 thru 11/27/09 is
November

I'm looking for a formula that will tell me what month the date falls in.

I tried this...(not working)
=IF(OR(G7="09/26/2009","October",IF(G7<="10/23/09","October",IF(G7="10/24*/2009","November",IF(G7<="11/27/09","November",IF(G7="11/28/09","December"*,IF(G7="12/31/2009","December",FALSE)))))))

I'm not sure if I'm even on the right track.

Please help

Thank you,
T


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



All times are GMT +1. The time now is 05:33 PM.

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"