Mark Last Date Of Each Month using Excel Formula

GreenCat223

New Member
Joined
Mar 27, 2024
Messages
9
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
Hello Excel Gurus!

I was wondering if you guys could help me with writing a formula that flags the last date of each month and mark with an "x"? I could manually scan through the rows and flag the last day of each month but this can be tiresome if my data stretches more than a year.

I can't figure out the logic to this, which is why I've decided to post this question on here.

Many thanks for your help!

DatesFlag last date of month
01/01/2025
02/01/2025
03/01/2025
04/01/2025
05/01/2025
06/01/2025
07/01/2025
08/01/2025
09/01/2025
10/01/2025
11/01/2025
12/01/2025
13/01/2025
14/01/2025
15/01/2025
16/01/2025
17/01/2025
18/01/2025
19/01/2025
20/01/2025
21/01/2025
22/01/2025
23/01/2025
24/01/2025
25/01/2025
26/01/2025
27/01/2025
28/01/2025
29/01/2025
30/01/2025
31/01/2025x
01/02/2025
02/02/2025
03/02/2025
04/02/2025
05/02/2025
06/02/2025
07/02/2025
08/02/2025
09/02/2025
10/02/2025
11/02/2025
12/02/2025
13/02/2025
14/02/2025
15/02/2025
16/02/2025
17/02/2025
18/02/2025
19/02/2025
20/02/2025
21/02/2025
22/02/2025
23/02/2025
24/02/2025
25/02/2025
26/02/2025
27/02/2025
28/02/2025x
01/03/2025
02/03/2025
03/03/2025
04/03/2025
05/03/2025
06/03/2025
07/03/2025
08/03/2025
09/03/2025
10/03/2025
11/03/2025
12/03/2025
13/03/2025
14/03/2025
15/03/2025
16/03/2025
17/03/2025
18/03/2025
19/03/2025
20/03/2025
21/03/2025
22/03/2025
23/03/2025
24/03/2025
25/03/2025
26/03/2025
27/03/2025
28/03/2025
29/03/2025
30/03/2025
31/03/2025x
 
one way to do it:
Excel Formula:
=if(month(A2)=month(A3),"","x")
and another:
Excel Formula:
=if(eomonth(A2,0)=A2,"x","")
 
Upvote 0
Since your data is reasonably large you could use this adaptation of the above suggestion with your 365 version to do the whole column without having to copy down.
Assuming the last date is in A250 ..
Excel Formula:
=MAP(A2:A250,LAMBDA(r,IF(r=EOMONTH(r,0),"x","")))

.. or if you aren't sure where the last date might be
Excel Formula:
=LET(a,A2:A1000,MAP(A2:INDEX(a,COUNT(a)),LAMBDA(r,IF(r=EOMONTH(r,0),"x",""))))
 
Upvote 0

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