Highlighting Row based on Current Date

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
341
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
I am working in an excel file that I want to highlight the current period row where Column B is the Begin of Period Date and Column C is the End of Period Date. Using the formula =AND(TODAY()>=$B3,TODAY()<=$C3) in conditional formatting. However for today (March 8, 2025) it is still highlighting the row for the period February 20, 2025 to March 5, 2025. Where am I going wrong?


Calculator Backpay Retro Owed - General.xlsx
ABCDEFGHIJ
429/5/248/22/249/4/2414$ 1.00--14.00--
439/19/249/5/249/18/2414$ 1.00--14.00--
4410/3/249/19/2410/2/2414$ 1.00--14.00--
4510/17/2410/3/2410/16/2414$ 1.00--14.00--
4610/31/2410/17/2410/30/2414$ 1.00--14.00--
4711/14/2410/31/2411/13/2414$ 1.00--14.00--
4811/28/2411/14/2411/27/2414$ 1.00--14.00--
4912/12/2411/28/2412/11/2414$ 1.00--14.00--
5012/26/2412/12/2412/25/2414$ 1.00--14.00--
511/9/2512/26/241/8/2514$ 1.00--14.00--
521/23/251/9/251/22/2514$ 1.00--14.00--
532/6/251/23/252/5/2514$ 1.00--14.00--
542/20/252/6/252/19/2514$ 1.00--14.00--
553/6/252/20/253/5/2514$ 1.00--14.00--
563/20/253/6/253/19/2514$ 1.00--14.00--
574/3/253/20/254/2/2514$ 1.00--14.00--
584/17/254/3/254/16/2514$ 1.00--14.00--
595/1/254/17/254/30/2514$ 1.00--14.00--
605/15/255/1/255/14/2514$ 1.00--14.00--
615/29/255/15/255/28/2514$ 1.00--14.00--
626/12/255/29/256/11/2514$ 1.00--14.00--
636/26/256/12/256/25/2514$ 1.00--14.00--
647/24/257/10/257/23/2514$ 1.00--14.00--
658/7/257/24/258/6/2514$ 1.00--14.00--
NYS State Payroll
Cell Formulas
RangeFormula
D42:D65D42=C42-B42+1
E42:E65E42=E41
F42:F65F42=IF(DATE(2023,3,1)-[@[Begin Date]]<1,0,DATE(2023,3,1)-[@[Begin Date]])
G42:G65G42=MAX(0,MIN([@[End Date]],(DATE(2024,4,1))-1)-MAX([@[Begin Date]],DATE(2023,3,1))+1)
H42:H65H42=MAX(0,MIN([@[End Date]],(DATE(2025,9,1))-1)-MAX([@[Begin Date]],DATE(2024,4,1))+1)
I42:I65I42=MAX(0,MIN([@[End Date]],(DATE(2026,9,1))-1)-MAX([@[Begin Date]],DATE(2025,9,1))+1)
J42:J65J42=MAX(0,MIN([@[End Date]],(DATE(2027,11,30))-1)-MAX([@[Begin Date]],DATE(2026,9,1))+1)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A3:R121Expression=NOT($D3=14)textYES
A2:R1048576Expression=TODAY()<$A3-13textNO
A2:R1048576Expression=AND(TODAY()>=$B3,TODAY()<=$C3)textNO
 
Your conditional formatting rule applies to rows starting with 2, but the formula references row 3. In your formula change both occurrences of 3 to 2.
 
Upvote 0
Solution

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