Formating for Look Ahead

traha

New Member
Joined
Aug 2, 2007
Messages
4
Extra to yesterdays question

I have set a condition in b1 so that when I enter a date in b1 I want it to reference a1, and return blue text if it is less or equal, and red text if it is greater.

I now want to set a further condition so that a1 changes to red text if no date has been entered by 5 days before the date in a1

Thanks in anticipation
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
you can use a user defined function in such as:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B1")) Is Nothing Then
Exit Sub
Else
Range("A2") = Now 'or any blank cell in which the last input time_
will be recorded
End If
End Sub

' this function should be added in the related sheet in VB editor (press "Alt + F11")

and for example in cell A3 you may write (maybe with white fonts not to be seen):
"=IF(DAYS360(A2;NOW())<5;"";"A1")"
and now you can conditionally format A1 acording to A3, such as if A1 = A3 color red.

hope i didn' misunderstand your question!
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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