mezzopiano1423
New Member
- Joined
- Feb 12, 2013
- Messages
- 10
I am trying to create a formula that will assign the quarter of the calendar year from which each month belongs. I have a long list of numeric months (A), and want the output of the formula in (B) to be as follows:
A B
1 Q1
12 Q4
3 Q1
5 Q2 etc.
I would do a Vlookup but I resolved to better understand nested if functions. However, I just can't make them work, no matter how simple I begin.
I tried using OR instead of nesting 3 IF's - that's a good start, right? However, no luck with the following formula. Also, I stopped at Q2 so I could troubleshoot if needed, surprise surprise:
=IF(OR(B2="Jan","Feb","Mar"),"Q1",IF(OR(B2="Apr","May","Jun"),"Q2",""))
Is the problem here that I am testing multiple conditions?
Condition 1 = if the month is jan, feb mar, the result is Q1 ELSE
condition 2 = if the month is apr, may, jun, the result is Q2 ELSE
and so on
Any input is greatly appreciated. Thank you,
PSR
A B
1 Q1
12 Q4
3 Q1
5 Q2 etc.
I would do a Vlookup but I resolved to better understand nested if functions. However, I just can't make them work, no matter how simple I begin.
I tried using OR instead of nesting 3 IF's - that's a good start, right? However, no luck with the following formula. Also, I stopped at Q2 so I could troubleshoot if needed, surprise surprise:
=IF(OR(B2="Jan","Feb","Mar"),"Q1",IF(OR(B2="Apr","May","Jun"),"Q2",""))
Is the problem here that I am testing multiple conditions?
Condition 1 = if the month is jan, feb mar, the result is Q1 ELSE
condition 2 = if the month is apr, may, jun, the result is Q2 ELSE
and so on
Any input is greatly appreciated. Thank you,
PSR