Forum Discussion
Background color in Excel
- Aug 28, 2024
The attached workbook demonstrates an approach using the Worksheet_Activate event procedure of Sheet 2. The colors will be updated when Sheet 2 is activated.
You will have to allow macros when you open the workbook.
To view/edit the code, right-click the sheet tab of Sheet 2 and select 'View Code' from the context menu.
Formulas only look at the value of other cells, not their formatting.
If the background color of the cell that you refer to is the result of conditional formatting, you can use conditional formatting to color the cell with the formula too.
If the background color has been applied manually, it would be complicated.
- Mac_RidderAug 28, 2024Copper ContributorHansVogelaar
Hi Hans
Thank you very much for your reply. Yes, the background color has been applied manually. So, when you say that it would be complicated - do you mean it's impossible? Or is there a way to make it work?- HansVogelaarAug 28, 2024MVP
Will the formulas always be on another worksheet than the sheet with the 'source' cells?
Or could they be on the same sheet?
- Mac_RidderAug 28, 2024Copper ContributorHansVogelaar
Both are possible. - I can adapt the solution according to the possibilities.