Conditional formatting with different dates

Jdog12

New Member
Joined
May 21, 2020
Messages
23
Office Version
  1. 365
Platform
  1. Windows
I set up a spreadsheet for final pay with conditional formatting It is to remind me when to start processing final check.

Cell D1 has the current date.

Cell D8 is last day of work

Cell F8 is 5 days prior to last day

Cell B8 has conditional formatting when current date is greater than or equal to 5 days prior to last day.

Column F thru Column I will be hidden

It works fine when I set up conditional formatting for the rows I want every time. On the row with conditional formatting, when I delete only the name and last day, the message “To process final pay “ is still there until I enter a new name and last date.

Is there a way to do this without setting up conditional formatting every time? Basically, I don’t want to see the message “To process final pay” when the row has no name nor last date.

Any help or suggestion will be appreciated.
conditional formatting for final pay.xlsx
ABCDEFGHI
1current date9/30/20215To process final pay
2=TODAY()
3
4
5
6NameActionLast day of work5 days prior to last day
7
8John DoeTo process final pay9/28/20219/23/2021
9=IF($D$1>=F8, "To process final pay", " ")=$D$8-$H$1
10
11
12
13
14To process final pay####################
15
16
Sheet2
Cell Formulas
RangeFormula
D1D1=TODAY()
D2,F9,B9D2=FORMULATEXT(D1)
B8,B14B8=IF($D$1>=F8, "To process final pay", " ")
F8F8=$D$8-$H$1
F14F14=$D$14-$H$1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B:BCell Value=$I$1textNO
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
you can get rid of all those hidden columns if you want and just write 1 formula for B and 1 formula for conditional formatting

but to answer just the question you asked
add a check for column A being blank, if its NOT Blank , then you want to check the dates

we can use and AND and add A8 <> "" A8 does not equal a blank

=IF($D$1>=F8, "To process final pay", " ")
change to
=IF(AND ( A8 <> "", $D$1>=F8), "To process final pay", " ")

if you want to get rid of all those other references
we can add it directly into the formulas and the same for conditional formatting
But I will await your reply, as i have to leave now for the day ..... others may answer meanwhile
 
Upvote 0
you can get rid of all those hidden columns if you want and just write 1 formula for B and 1 formula for conditional formatting

but to answer just the question you asked
add a check for column A being blank, if its NOT Blank , then you want to check the dates

we can use and AND and add A8 <> "" A8 does not equal a blank

=IF($D$1>=F8, "To process final pay", " ")
change to
=IF(AND ( A8 <> "", $D$1>=F8), "To process final pay", " ")

if you want to get rid of all those other references
we can add it directly into the formulas and the same for conditional formatting
But I will await your reply, as i have to leave now for the day ..... others may answer meanwhile
It did not work becasue when I removed the name from column A, "To process final pay" is still in column B.

Basically, I want to remove the name and last day of work , and "To process final pay" stop appearing. Then when I enter new info to name and last day, the conditional formatting will work automatically.
 
Upvote 0
Did you put @etaf 's formula in B8 ?
Using row 8 I would put this in F8
Excel Formula:
=IF($D8="","",$D8-$H$1)

And this in B8 basically the same just $ in different places.
Excel Formula:
=IF(AND($A8<>"",$D$1>=$F8), "To process final pay", " ")
 
Upvote 0
Thank etaf for leading me to the direction.

I figured it out with "AND" function

conditional formatting for final pay.xlsx
ABCDEF
1current date10/1/2021
2=TODAY()
3
4
5
6NameActionLast day of work5 days prior to last day
7
8John DoeTo process final pay9/28/20219/23/2021
9=IF(AND(A8<>" ",D8<>" ",$D$1>=F8,F8>0),"To process final pay", " ")=$D$8-$H$1
10
11
Sheet2
Cell Formulas
RangeFormula
D1D1=TODAY()
D2,F9,B9D2=FORMULATEXT(D1)
B8B8=IF(AND(A8<>" ",D8<>" ",$D$1>=F8,F8>0),"To process final pay", " ")
F8F8=$D$8-$H$1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:B7,B9:B1048576Cell Value=$I$1textNO
 
Upvote 0
Solution
glad its all sorted for you now

As i say , you don't actually need all the other columns , and can do it all with just 1 formula , unless you need the columns for some other reason
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,888
Members
449,097
Latest member
dbomb1414

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