Need help in identifying dates

aryanaveen

Board Regular
Joined
Jan 5, 2015
Messages
96
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​
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

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)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,521
Messages
5,596,644
Members
414,083
Latest member
Mrsash

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