Hi,
I have a very large worksheet that has gotten too big and too slow so I am trying to get rid of formatting and volatile functions among other things where possible.
I currently use the built-in conditional formatting to achieve the result mentioned below and would like to find a way to do this in a macro instead.
Goal: Use a macro to conditionally color cells in a timeline based on start date, end date and index # (this part I couldn't do with built-in conditional approach) to start to reduce the tax on my system from a large worksheet with lots of entries, formatting and volatile function use.
Example: Mini-sheet showing blank examples of inputs in a typical sheet and the desired result. The only approach where I have gotten close is to looping through each cell in each row to lookup the offset dates above to color (w/Cell.Interior.ColorIndex) if its dates falls between the Start and End date, but it is really slow to calculate so I'm hoping someone has a more efficient idea.
Thank you
I have a very large worksheet that has gotten too big and too slow so I am trying to get rid of formatting and volatile functions among other things where possible.
I currently use the built-in conditional formatting to achieve the result mentioned below and would like to find a way to do this in a macro instead.
Goal: Use a macro to conditionally color cells in a timeline based on start date, end date and index # (this part I couldn't do with built-in conditional approach) to start to reduce the tax on my system from a large worksheet with lots of entries, formatting and volatile function use.
Example: Mini-sheet showing blank examples of inputs in a typical sheet and the desired result. The only approach where I have gotten close is to looping through each cell in each row to lookup the offset dates above to color (w/Cell.Interior.ColorIndex) if its dates falls between the Start and End date, but it is really slow to calculate so I'm hoping someone has a more efficient idea.
Thank you
Book2 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | |||
2 | Start | End | Index | Task | 7/1/2022 | 7/2/2022 | 7/3/2022 | 7/4/2022 | 7/5/2022 | 7/6/2022 | 7/7/2022 | 7/8/2022 | 7/9/2022 | 7/10/2022 | 7/11/2022 | 7/12/2022 | 7/13/2022 | ||
3 | 7/1/2022 | 7/4/2022 | 4 | A | |||||||||||||||
4 | 7/2/2022 | 7/9/2022 | 1 | B | |||||||||||||||
5 | 7/5/2022 | 7/12/2022 | 7 | C | |||||||||||||||
6 | 7/9/2022 | 7/10/2022 | 2 | D | |||||||||||||||
7 | 7/11/2022 | 7/23/2022 | 2 | E | |||||||||||||||
8 | |||||||||||||||||||
9 | Desired Result | ||||||||||||||||||
10 | Start | End | Index | Task | 7/1/2022 | 7/2/2022 | 7/3/2022 | 7/4/2022 | 7/5/2022 | 7/6/2022 | 7/7/2022 | 7/8/2022 | 7/9/2022 | 7/10/2022 | 7/11/2022 | 7/12/2022 | 7/13/2022 | ||
11 | 7/1/2022 | 7/4/2022 | 4 | A | |||||||||||||||
12 | 7/2/2022 | 7/9/2022 | 1 | B | |||||||||||||||
13 | 7/5/2022 | 7/12/2022 | 7 | C | |||||||||||||||
14 | 7/9/2022 | 7/10/2022 | 3 | D | |||||||||||||||
15 | 7/11/2022 | 7/23/2022 | 5 | E | |||||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G2,G10 | G2 | =TODAY() |
H2:S2,H10:S10 | H2 | =G2+1 |