How to highlight area from start to end date in Excel using VBA? -
i have start , end dates given in columns , b. choose range want @ , generate row of dates starts c1 , can end @ point. need highlight row start date end date right of given dates. there way this? have no idea start...help, please. example,
i want @ range 5/2/2015 5/5/2015 instead of zeros need area highlighted.
b c d e f g 1 start end 5/2/2015 5/3/2015 5/3/2015 5/4/2015 5/52015 2 5/1/2015 5/3/2015 00000000000000000 3 5/2/2015 5/2/2015 00000000 4 5/4/2015 5/5/2015 0000000000000000
i found believe typo in e1. changed 5/4/2015 (one day in advance of d1) , adjusted f1:g1 suit.
- select c2:g4 c2 active cell.
- choose home ► conditional formatting ► new rule.
- when new formatting rule has opened, choose use formula determine cells format , supply following in format cells formula true: text box:
=and(c$1>=$a2, c$1<=$b2)
- click format , choose formatting changes. chose green fill
- click ok accept formatting ok again create new rule.
your results should resemble sample image provided @ beginning of proposed solution.
if need expand range, select c2 , go home ► conditional formatting ► manage rules. change applies to: reflect new expanded range , click ok save changes.
Comments
Post a Comment