Forum Discussion
Conditional formatting different cells
Hi all, I hope you can help me out here.
As you can see in the picture the color of cel A15 till C22 needs to be blue if B20 = 3-Afgehaald.
The color needs to be green if B20 = 2-Bevestigd, Gray with white text if B20=4-Teruggebracht.
The same formatting needs to work on cell A25 till C32 if B30 is 2-bevetigd or 3-afgehaald or ...
At this moment I need to copy the formatting and changing the values of every block.
That for 365 days by 2 blocks? Hope some vba code could help.
Something like
If B20=2-Bevestigd cell-4 till +30 will be that conditional formatting.
Many thanks
Peter
2 Replies
- MohamedGadAllahCopper Contributor
If I got you correctly, do you need to create blocks for other days and then apply conditional format for these created blocks?
I am glad to help if you provide more information.
- KegelsPeterCopper Contributor
Hi MohamedGadAllah,
It is difficult to explain. But the system is working as needed. The only problem is to copy the conditional formatting from one block to another.
The refecence cell will alwasy be the one from the original and not from the new block.
If i copy the conditional formatting from b15:c22 with the reference cell b10 to b25:c32 then the reference cell will still be b10.
The reason is the format: =$B$10="4-Teruggebracht" .... then color.
If i dot it like this: =$B10="4-Teruggebracht" .... then it is coloring just 1 cell and not the whole block.
So i need a VBA code to make it working. If i need to do the conditional formatting for every block = 2x365 blocks.... That can not be the idea.