Change Cell Contents if Cell Date is in Previous Month / 4 Months

Mazzic

New Member
Joined
Sep 17, 2019
Messages
4
Good morning!

I have a layout that looks like this:

xCTiS1q.png



For one criteria, I would like to:
Display QUAL if the date is in the current or previous month.
Display NC/QUAL if the date is before the previous month.
Display UNQUAL if the date is blank.

For a different criteria, I would like to:
Display QUAL if the date is from May/June/July/Aug OR if the date is in Sept/Oct/Nov/Dec
Display NC/QUAL if the date is prior to May
Display UNQUAL if the date is blank.

Thanks in advance!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
For the first part what happens if the date is in the future?
 
Upvote 0
The date entered should never be in the future based on the way the spreadsheet works, but in a formula case QUAL would be acceptable
 
Upvote 0
In that case how about
=IF(A2="","UN",IF(MONTH(TODAY())-MONTH(A2)>=2,"NC/",""))&"QUAL"
 
Upvote 0
That works perfectly - truly impressed with your solution!

Looking to decipher your formula so I can re-arrange it based on the other parts of my spreadsheet, if the date range is blank, it returns UN. if the month of the date is either today's month or today's month minus two months, it returns NC/, and it always returns QUAL. Right?
 
Upvote 0
That works perfectly - truly impressed with your solution!

Looking to decipher your formula so I can re-arrange it based on the other parts of my spreadsheet, if the date range is blank, it returns UN. if the month of the date is either today's month or today's month minus two months, it returns NC/, and it always returns QUAL. Right?

You've understood it correctly. :)
Although as Joe4 has pointed out, I didn't factor in changing years.
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,164
Members
452,615
Latest member
bogeys2birdies

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