Thread: IF OR Formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
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