0
votes

I am making headword stickers in a library and I would like to ask is there any solution in VBA to copy color from another cell (like this) and then hide color from copied cell. Color of cell comes from conditional formatting. I am using excel 2013.

Result should look like this:

A1: 07 (no color fill, determines color of A3)
A2: ABC (no color fill)
A3: only color fill

1
Your request doesn't sound logical to me. If the source cell colour is that way because of conditional formatting, then the only way to remove the source colour would be to remove the conditional formatting, which could be done as part of the VBA code, but doesn't make sense becaue it means the code only ever works once. i.e. Once you have removed the conditional formatting, then the code wont trigger again - Mark Moore
I thought that using both conditional formatting and VBA would be easier because I have 32 different source cells and 50-ish rules. So only in conditional formatting the list of different rules might be long. Would it be easier to use only VBA? - Redelokki

1 Answers

0
votes

OP seems reluctant be be more specific about the requirement but should anyone else want to colour fill A3 based on a value in A1 this can be achieved quite simply by selecting A3 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::

=A1="07"

Format... with fill of choice, OK, OK.

Another rule, with another colour might be added, say:

 =A1="08" 

and so forth.

There appears to be no need to apply Conditional Formatting to A1, then copy it to A3 then remove it from A1.