Conditional Formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-3239460%22%20slang%3D%22en-US%22%3EConditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3239460%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20currently%20upgrading%20a%20sheet%20for%20our%20production%20team.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20simple%20planning%20sheet%20and%20I%20am%20inserting%20conditional%20formatting%20into%20the%20template.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOriginal%20formula%20is%20%3D%24D%247%3D%22Complete%22%20this%20would%20change%20the%20text%20colour%20of%20cells%20%24B%247%3A%24D%247%2C%20the%20problem%20I%20have%20run%20into%20is%20when%20I%20had%20to%20copy%20and%20paste%20this%20formula%20to%20apply%20it%20to%20other%20ranges%20within%20the%20sheet.%20The%20range%20the%20the%20formula%20applies%20to%20changes%20with%20each%20copy%20and%20paste%20but%20the%20original%20D7%20cell%20remained%20constant.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20changed%20D7%20from%20an%20absolute%20to%20a%20relative%20reference%2C%20which%20seemed%20to%20solve%20my%20issue%2C%20however%20when%20I%20tested%20the%20conditional%20formatting%20the%20change%20in%20text%20colour%20is%20now%20only%20applied%20to%20the%20first%20cell%20in%20the%20each%20range%2C%20so%20the%20formula%20%3DD7%3D%22Complete%22%20applied%20to%20the%20range%20%24B%247%3A%24D%247%20only%20changes%20the%20colour%20of%20the%20text%20in%20cell%20B7.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20went%20through%20and%20changed%20all%20of%20the%20conditional%20formatting%20back%20to%20absolute%20references%20for%20every%20conditional%20formatting%20formula%20for%20every%20range.%20However%20now%20when%20I%20copy%20the%20first%20group%20of%20ranges%20and%20paste%20a%20second%20group%20the%20absolute%20references%20remains%20rather%20than%20changing%20for%20each%20new%20line.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20fix%20for%20this%3F%20I%20really%20don't%20want%20to%20have%20to%20manually%20change%20525%20conditional%20formatting%20rules%20in%20every%20group%20of%20ranges!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3239460%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3239480%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20Formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3239480%22%20slang%3D%22en-US%22%3Eyes%20and%20no.%20there%20is%20no%20magic%20that%20will%20treat%20the%20%24D%247%20as%20relative%20when%20copying%20but%20absolute%20for%20the%20conditional%20formatting.%3CBR%20%2F%3EThat%20said%2C%20maybe%20we%20can%20make%20the%20formula%20smarter%20to%20do%20what%20you%20need%2Fwant.%3CBR%20%2F%3EFor%20example%20if%20you%20are%20copying%20down%20to%20every%20row%20so%20row%208%20would%20be%20%24D%248%20you%20only%20need%20the%20%24%20on%20the%20column%20D%20for%20what%20you%20are%20doing%20so%20the%20row%20(7)%20can%20be%20relative%20and%20change.%20So%3A%3CBR%20%2F%3E%3D%24D7%3D%22Complete%22%3CBR%20%2F%3Ewill%20%22hold%22%20column%20D%20but%20let%20row%207%20change%20so%20the%20range%20B7%3AD7%20will%20always%20look%20at%20column%20D%20and%20hence%20D7%20in%20each%20of%20those%20cases%20and%20when%20copied%20to%20row%208%20it%20becomes%20D8.%20In%20FACT%20you%20can%20apply%20the%20conditional%20formatting%20to%20the%20entire%20columns%20B%3AD%20and%20use%20that%20single%20formula%3A%3CBR%20%2F%3E%3D%24D7%3D%22Complete%22%3CBR%20%2F%3Ebecause%20as%20it%20check%20the%20following%20rows%20it%20will%20increment%20the%20relative%20row%20value%20accordingly.%3CBR%20%2F%3EIf%20this%20doesn't%20work%20for%20you%20because%20it%20is%20more%20complicated%2C%20maybe%20include%20a%20sample%20sheet%20and%20more%20details%20and%20we%20can%20see%20what%20might%20work.%3C%2FLINGO-BODY%3E
Occasional Visitor

I am currently upgrading a sheet for our production team.

 

A simple planning sheet and I am inserting conditional formatting into the template.

 

Original formula is =$D$7="Complete" this would change the text colour of cells $B$7:$D$7, the problem I have run into is when I had to copy and paste this formula to apply it to other ranges within the sheet. The range the the formula applies to changes with each copy and paste but the original D7 cell remained constant.

 

So I changed D7 from an absolute to a relative reference, which seemed to solve my issue, however when I tested the conditional formatting the change in text colour is now only applied to the first cell in the each range, so the formula =D7="Complete" applied to the range $B$7:$D$7 only changes the colour of the text in cell B7.

 

So I went through and changed all of the conditional formatting back to absolute references for every conditional formatting formula for every range. However now when I copy the first group of ranges and paste a second group the absolute references remains rather than changing for each new line.

 

Is there a fix for this? I really don't want to have to manually change 525 conditional formatting rules in every group of ranges!

1 Reply
yes and no. there is no magic that will treat the $D$7 as relative when copying but absolute for the conditional formatting.
That said, maybe we can make the formula smarter to do what you need/want.
For example if you are copying down to every row so row 8 would be $D$8 you only need the $ on the column D for what you are doing so the row (7) can be relative and change. So:
=$D7="Complete"
will "hold" column D but let row 7 change so the range B7:D7 will always look at column D and hence D7 in each of those cases and when copied to row 8 it becomes D8. In FACT you can apply the conditional formatting to the entire columns B:D and use that single formula:
=$D7="Complete"
because as it check the following rows it will increment the relative row value accordingly.
If this doesn't work for you because it is more complicated, maybe include a sample sheet and more details and we can see what might work.