Home > Forum Home > Automating Data Analysis Tasks > Multiple If condition Share

Multiple If condition

Excel Help for Multiple If Condition in Automating Data Analysis Tasks


Forum TopicPost Reply Login

Multiple If Condition

Rate this:
(3/5 from 1 vote)
ConfusedI'd appreciate any help on this formula I'm working with.
On Column E, I have dates. On column F, I need to have the Fiscal Quarters. So, if the date on E is between 4/1/08 and 6/28/08, column E should read Q1 and so on.
So far I have this:

=IF(AND(E2>4/1/8<6/28/8),"Q1",IF(AND(E2>6/28/8<9/27/8),"Q2",IF(AND(E2>9/27/8<12/27/8),"Q3",IF(AND(E2>12/27/8<3/31/9),"Q4",IF(AND(E2>3/31/9),"FY09/10",0)))))

And no matter the date, the result I get on column F is FY09/10. What am I doing wrong?
Thanks!
 Paula
 Posted by on
 
Replies - Displaying 1 to 4 of 4Order Replies By: Most Recent | Chronological | Highest Rated
Surprised
Rate this:
(3/5 from 1 vote)
You could make the formula much simpler by using the MONTH function.  This returns an integer from 1 to 12.  You can then use the ROUNDUP function by dividing the month by 3 thereby making the formula ="Q" & ROUNDUP(MONTH(date)/3,0).
 Excel Business Forums Administrator
 Posted by on
Fedup
Rate this:
(3/5 from 1 vote)
The problem is that our quarters don't exactly end at the end of the month in question, see? So, regretably, that won't help me much.
Thanks for trying to help though!
 Paula
 Posted by on
Oops
Rate this:
(3/5 from 1 vote)
It would help if you could supply an example of your columns using the spreadsheet formatting icon.  I notice as well that in your AND statements you have not specified E2 in the second argument preceded by a comma.
 Excel Business Forums Administrator
 Posted by on
Happy
Rate this:
(3/5 from 1 vote)
You can use formula:

=IF(MONTH(E2)<4,"Quarter 1",IF(MONTH(E2)<7,"Quarter 2",IF(MONTH(E2)<10,"Quarter 3","Quarter 4")))

this will give you the output "Quarter 1/2/3/4" according to the quarter to which it belongs

Hope this information is useful

Thanks
Pooja
 PD
 Posted by on
 Displaying page 1 of 1 

Find relevant Excel templates and add-ins for Multiple If condition in the