Date conversion into Quarters in excel

willisd

New Member
Joined
Jul 9, 2016
Messages
13
Hi
I want to add an OR/IF formula that allows me to return a value (in this case, quarter) once I specify the month. I can do the first part (below) but I cant complete the forumula so that if Feb/Mar/April return Q2, if May/Jun/July return Q3 etc.

Can somebody help me write the full formula thanks

=IF(OR(A5="january", A5="february", A5="march"),"Q1","")
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
try this

=LOOKUP(MONTH(DATEVALUE(A5&" 1")),{1,4,7,10},"Q"&{1,2,3,4})
 
Upvote 0
hi thanks for your help. I tried and id didn't work. Is there anyway that you can keep it a long the lines of my formula? I just struggle with nested if and or statements and the number of brackets I have to use :) Many thanks if you can
 
Upvote 0
not sure why it didn't work for you.

to extend your formula to work,

=IF(OR(A7="january",A7="february",A7="march"),"Q1",IF(OR(A7="april",A7="may",A7="june"),"Q2",IF(OR(A7="july",A7="august",A7="september"),"Q3","Q4")))
 
Upvote 0

Forum statistics

Threads
1,226,113
Messages
6,189,048
Members
453,522
Latest member
Seeker2025

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top