Need help in identifying dates

aryanaveen

Board Regular
Joined
Jan 5, 2015
Messages
99
Hi All,

Can you please help me in writing a formula for below scenario

I need a formula which will refer to dates in column A and if the date falls in current month or previous month then status in column B should be updated as "Open", if the dates falls anything other than current month or previous month then status in column B should be "closed"

AB
1​
DateStatusCurrent date
2​
16-Jul-20​
16-Jul-20​
3​
16-Jun-20​
4​
6-Jul-20​
5​
16-Jun-20​
6​
16-Mar-20​
7​
26-Mar-20​
8​
5-Jan-20​
9​
16-Feb-20​
10​
16-Aug-20​
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,977
Office Version
  1. 365
Platform
  1. Windows
Try this

=IF(AND(A2>EOMONTH(TODAY(),-2),A2<=EOMONTH(TODAY(),0)),"Open","Closed")
 

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,977
Office Version
  1. 365
Platform
  1. Windows
thanks for your feedback (y)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,272
Messages
5,836,326
Members
430,420
Latest member
Sensen

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
Top