Highlight cell if value is 1-2,000 less than value of another cell?

kwindels

New Member
Joined
Apr 25, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I'm tracking when service is due on a bunch of vehicles and want the current mileage I have listed to highlight orange when almost due.

I have my current mileage in column F and my service due mileage in column D. So when F is between 1 and 2000 less than D, it should highlight orange. In the picture F225 should highlight orange.
image001.png


I've used conditional formatting to highlight if column F is greater than column D to show when the unit is overdue, just can't figure the formula out for this one.

Any help is greatly appreciated!!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
when F is between 1 and 2000 less than D,
=AND(D2-F2>=1,D2-F2<=2000)
Book10
ABCDEFGH
1DueMiles
23000199FALSE2801
33000499FALSE2501
43000799FALSE2201
530001099TRUE1901
630001399TRUE1601
730001699TRUE1301
830001999TRUE1001
930002299TRUE701
1030002599TRUE401
1130002899TRUE101
1230003199FALSE-199
Sheet1
Cell Formulas
RangeFormula
G2:G12G2=AND(D2-F2>=1,D2-F2<=2000)
H2:H12H2=D2-F2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:F12Expression=AND(D2-F2>=1,D2-F2<=2000)textNO


column G and H are just for illustration
 
Upvote 1
Solution
when F is between 1 and 2000 less than D,
=AND(D2-F2>=1,D2-F2<=2000)
Book10
ABCDEFGH
1DueMiles
23000199FALSE2801
33000499FALSE2501
43000799FALSE2201
530001099TRUE1901
630001399TRUE1601
730001699TRUE1301
830001999TRUE1001
930002299TRUE701
1030002599TRUE401
1130002899TRUE101
1230003199FALSE-199
Sheet1
Cell Formulas
RangeFormula
G2:G12G2=AND(D2-F2>=1,D2-F2<=2000)
H2:H12H2=D2-F2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:F12Expression=AND(D2-F2>=1,D2-F2<=2000)textNO


column G and H are just for illustration
Thank you so much!! That worked perfectly :)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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