One of my managers asked me to do this for him, and I've been trying most of the day to wrap my brain around a 'simple' solution to this and coming up dry. I need to have the cells in column G color based on a value in themselves or in adjacent cell in column H.
I have three columns (F,G,H) all with dates in them. Column F is manually filled in, column G is calculated with a workday function
to be 25 days later and column H is also manually filled in.
[TABLE="width: 500"]
<tbody>[TR]
[TD](F)
Date of Meeting
[/TD]
[TD](G)
Report Due Date
[/TD]
[TD](H)
Report Published
[/TD]
[/TR]
[TR]
[TD]1/7
[/TD]
[TD]2/11
[/TD]
[TD]1/14
[/TD]
[/TR]
[TR]
[TD]1/7
[/TD]
[TD]2/11
[/TD]
[TD]1/14
[/TD]
[/TR]
[TR]
[TD]1/8
[/TD]
[TD]2/12
[/TD]
[TD]1/21
[/TD]
[/TR]
[TR]
[TD]1/13
[/TD]
[TD]2/17
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The background color needs to be in cell/column G but is also dependent upon the adjacent cell values in column H.
-if cell G is blank, than color clear/white
- if there is no date in column H and the date in column G is within 7 days, color it yellow
-if the date in cell G is today, make it red
I can't seem to figure out how to write a function that will allow conditional formatting to make this work. I was thinking maybe adding an extra column to do some of the calculation would be better but can't figure out how to do that and then have it color cell G.
I might be able to use the color function VBA and just code the macro to run on open so the user doesn't have to click a button or anything. Working through that thought process now.
Any input would be greatly appreciated. Thanks!
Beka
I have three columns (F,G,H) all with dates in them. Column F is manually filled in, column G is calculated with a workday function
Code:
(=IFERROR(WORKDAY($F6,25,Holidays2016)," ")
[TABLE="width: 500"]
<tbody>[TR]
[TD](F)
Date of Meeting
[/TD]
[TD](G)
Report Due Date
[/TD]
[TD](H)
Report Published
[/TD]
[/TR]
[TR]
[TD]1/7
[/TD]
[TD]2/11
[/TD]
[TD]1/14
[/TD]
[/TR]
[TR]
[TD]1/7
[/TD]
[TD]2/11
[/TD]
[TD]1/14
[/TD]
[/TR]
[TR]
[TD]1/8
[/TD]
[TD]2/12
[/TD]
[TD]1/21
[/TD]
[/TR]
[TR]
[TD]1/13
[/TD]
[TD]2/17
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The background color needs to be in cell/column G but is also dependent upon the adjacent cell values in column H.
-if cell G is blank, than color clear/white
- if there is no date in column H and the date in column G is within 7 days, color it yellow
-if the date in cell G is today, make it red
I can't seem to figure out how to write a function that will allow conditional formatting to make this work. I was thinking maybe adding an extra column to do some of the calculation would be better but can't figure out how to do that and then have it color cell G.
I might be able to use the color function VBA and just code the macro to run on open so the user doesn't have to click a button or anything. Working through that thought process now.
Any input would be greatly appreciated. Thanks!
Beka