Hi All
I created conditional formatting:
CF_date.png
Right now the column D is blank but all cells in the column color
How create conditional formatting to color only if date value in the column is previous month or early?
Thanks
Hi All
I created conditional formatting:
CF_date.png
Right now the column D is blank but all cells in the column color
How create conditional formatting to color only if date value in the column is previous month or early?
Thanks
Last edited by eugz; 09-05-2022 at 08:14 PM.
Try this
=AND(YEAR($D2)<=YEAR(TODAY()),MONTH($D2)<MONTH(TODAY()))
Last edited by kvsrinivasamurthy; 09-05-2022 at 11:17 PM.
Pl note
Array formula should be confirmed with Ctrl+Shift+Enter keys together.
If answere is satisfactory press * to add reputation.
Hi kvsrinivasamurthy. Thanks for reply.
Your conditional formatting has the same problem like and my. It continue fill coloring cell if cell blank also. I try to formatting only if cells have value.
Thanks
Please try =AND(D2>0,D2<DATE(YEAR(D2),MONTH(D2),1))
Try
=AND($D2<>"",YEAR($D2)<=YEAR(TODAY()),MONTH($D2)<MONTH(TODAY()))
@kvsrinivasamurthy
I think your formula doesn't always work well.
If D2 = December 15, 2021 then the formula returns FALSE,
because the month of December is not smaller than today's month (September),
but December 2021 is still ahead of today.
Try this
If result is not ok then, pl upload sample file showing the required results.![]()
Please Login or Register to view this content.
Last edited by kvsrinivasamurthy; 09-06-2022 at 07:55 AM.
Hi HansDouwe. Thanks for reply.
Your formula remove color for blank cells but it also remove color from cells with date value earlier last month. For instance, if date value 8/1/2022 a cell has color, but if cell value 7/31/2022 or earlier condition doesn't work. I used for last month condition rule: "Format only cells that contain", "Date Occurring", and "Last month". My problem create formula condition for date value earlier then last month and remine not color cells with blank value.
Thanks
Try:
=AND($D2<=EOMONTH(TODAY(),-1),$D2<>"")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks