Formula won't work...

ZXCV123

New Member
Joined
Mar 16, 2015
Messages
2
=IF(L2="Closed",(IF(MONTH($E2)<=3,"Q1",IF(MONTH($E2)<=6,"Q2",IF(MONTH($E2)<=9,"Q3",IF(MONTH($E2)<=12,"Q4",""))))&"-"&if(isblank($J2),Year(I2),$J2),"")

Hi,

Can anyone recognise where the error lies in the formula above? It won't let me enter it.

If you need any more information then let me know.

Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
=IF(L2="Closed",(IF(MONTH($E2)<=3,"Q1",IF(MONTH($E2)<=6,"Q2",IF(MONTH($E2)<=9,"Q3",IF(MONTH($E2)<=12,"Q4",""))))&"-"&if(isblank($J2),Year(I2),$J2),"")
 
Upvote 0
One too many brackets



=IF(L2="Closed",(IF(MONTH($E2)<=3,"Q1",IF(MONTH($E2)<=6,"Q2",IF(MONTH($E2)<=9,"Q3",IF(MONTH($E2)<=12,"Q4",""))))&"-"&if(isblank($J2),Year(I2),$J2),"")
 
Upvote 0
You have an extra ( in there

=IF(L2="Closed",(IF(MONTH($E2)<=3,"Q1",IF(MONTH($E2)<=6,"Q2",IF(MONTH($E2)<=9,"Q3",IF(MONTH($E2)<=12,"Q4",""))))&"-"&if(isblank($J2),Year(I2),$J2),"")
Should be
=IF(L2="Closed",IF(MONTH($E2)<=3,"Q1",IF(MONTH($E2)<=6,"Q2",IF(MONTH($E2)<=9,"Q3",IF(MONTH($E2)<=12,"Q4",""))))&"-"&if(isblank($J2),Year(I2),$J2),"")
 
Upvote 0
Also, here's a much easier way to get the quarter number from a date..

CEILING(MONTH(E2)/3,1)

So you could do
=IF(L2="Closed","Q"&CEILING(MONTH(E2)/3,1)&"-"&IF(ISBLANK($J2),YEAR(I2),$J2),"")
 
Upvote 0

Forum statistics

Threads
1,216,477
Messages
6,130,862
Members
449,600
Latest member
inborntarmac

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