Conditional Formatting last n rows as data entered

nburaq

Board Regular
Joined
Apr 2, 2021
Messages
222
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

I have data set as shown below and this is a dynamic data based on the last 12 months. I would like to highlight the cells of last 12 months if value is greater than 20. So, based on this example, between april 23- mar 24 only values of Apr/23,Jun/23, Sep/23 and Mar/24 will be highlighted as green and if I enter value for Apr/24 then THE new range will be May/23-Apr/24 and cells will be highlighted with new range.

LocationFloorWorkJan/23Feb/23Mar/23Apr/23May/23Jun/23Jul/23Aug/23Sep/23Oct/23Nov/23Dec/23Jan/24Feb/24Mar/24Apr/24May/24Jun/24Jul/24Aug/24Sep/24Oct/24Nov/24Dec/24
North1stPM20,2318,4215,7825,7818,9436,0416,8717,3626,3017,4417,3115,6416,4615,3227,41

Thanks for the comments and your help.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
It can be done. But it all depends on how you are entering Month-Year values in cells.

If they are dates then you can Conditional Format them. If they are manual text(s) better change them at earliest. Sooner or later you will need them top be dates to work with.
 
Upvote 0
It can be done. But it all depends on how you are entering Month-Year values in cells.

If they are dates then you can Conditional Format them. If they are manual text(s) better change them at earliest. Sooner or later you will need them top be dates to work with.
Check this and revert -

Book1
ABCDEFGHIJKLMNOPQ
1Jan-2023Feb-2023Mar-2023Apr-2023May-2023Jun-2023Jul-2023Aug-2023Sep-2023Oct-2023Nov-2023Dec-2023Jan-2024Feb-2024Mar-2024Apr-2024
2
Sheet1
Cell Formulas
RangeFormula
B1:Q1B1=DATE(2023,SEQUENCE(1,16,1,1),1)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
1:1Expression=AND(A1<=MAX(1:1),A1>=EDATE(MAX(1:1),-11))textNO
 
Upvote 1
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1LocationFloorWorkJan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24
2North1stPM20.2318.4215.7825.7818.9436.0416.8717.3626.317.4417.3115.6416.4615.3227.41
320.2318.4215.7825.7818.9436.0416.8717.3626.317.4417.3115.6416.4615.3227.4119.521.2
Sheet5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:AA4Expression=AND(D2>20,COUNTIFS(D2:$AA2,"<>")<=12)textNO
 
Upvote 1
Solution
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1LocationFloorWorkJan-23Feb-23Mar-23Apr-23May-23Jun-23Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24
2North1stPM20.2318.4215.7825.7818.9436.0416.8717.3626.317.4417.3115.6416.4615.3227.41
320.2318.4215.7825.7818.9436.0416.8717.3626.317.4417.3115.6416.4615.3227.4119.521.2
Sheet5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:AA4Expression=AND(D2>20,COUNTIFS(D2:$AA2,"<>")<=12)textNO
Thanks a lot it works perfectly! and thanks all to you!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,224,811
Messages
6,181,081
Members
453,021
Latest member
Justyna P

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