# Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

I need column C to go red after 5000 and if column D is yes then go back to white.....in increments of every 5000
Solved by K. S. in 20 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 07/05/2018 - 07:36
Hi
Excelchat Expert 07/05/2018 - 07:37
Welcome to Got IT Pro.
User 07/05/2018 - 07:37
hello
Excelchat Expert 07/05/2018 - 07:38
Excelchat Expert 07/05/2018 - 07:40
I can see there is Yes in row 22 , 26, and 29.
Excelchat Expert 07/05/2018 - 07:40
What is the reason for row 22?
User 07/05/2018 - 07:40
Every 5000 miles service is needed, I want it to highlight at 5000, 10000....and then revert back to white once column D states "YES"
Excelchat Expert 07/05/2018 - 07:40
21 or 22?
User 07/05/2018 - 07:41
22
Excelchat Expert 07/05/2018 - 07:41
26 or 27?
User 07/05/2018 - 07:42
26
Excelchat Expert 07/05/2018 - 07:42
Please let me know the logic you are following for these?
Excelchat Expert 07/05/2018 - 07:43
for 21,22 you are selecting 22. Where as for 26,27 it is 26?
User 07/05/2018 - 07:43
ok.....We are recording the mileage on company vehicles, once they reach 5000 miles I need column C to highlight red until Column D states YES
Excelchat Expert 07/05/2018 - 07:44
21 is 5002, which has crossed 5000?
User 07/05/2018 - 07:44
Correct, so it should highlight red. But the service was not completed until the next row
Excelchat Expert 07/05/2018 - 07:45
Why same logic is not applicable for 26, 27?
User 07/05/2018 - 07:46
the service was conducted early
Excelchat Expert 07/05/2018 - 07:48
It is not falling under logic.
Excelchat Expert 07/05/2018 - 07:49
Hope, service records are done at your end. But, for excel, it has to follow some logic. Either the first value of 5000 and 10000 or last values of 5000 or 10000.
Excelchat Expert 07/05/2018 - 07:54
I have updated the formula and conditional formatting based on the requirement.

This is the output file from the real Excelchat help session:
This is an example of the expert help you can get. It contains no private user information.

Get instant expert help with Excel and Google Sheets

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.