Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I run my format keeping code only when a range of cells changes?
I'm looking for a solution to keep my format in some cell areas in column B:B. The format need to be of two different choices, depending on if you got an "I" or an "K" in the cell to the left, in A:A column. It should allow users to copy and paste as they use to do, without ruin the code. I tried with a code creating format conditioning rules with For ....Step 1 ... Next for all cells, running at Sub Worksheet_Change, but it shakes like rock and roll every time you make a change. I just want to make a check in the cell to the left for that specific row the change took place, if that is possible. Font black if RC-1 is "K" and blue if it is "I", I have tried to start from a macro when recording format conditioning in excel. A part of it look of cource like this: ... Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=$A$6:$A$102=""I""" With Selection.FormatConditions(1).Font .Bold = True .Italic = False .ColorIndex = 1 End With .... etc If I want to run code with Sub Worksheet_Change, I guess I had to have a compleate other approach than "=$A$6:$A$102=""I""" Right? Because if I let code create the conditional format on every worksheet changes, it shakes like rock n roll... Any suggestions?? /My regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
very nice........... | Excel Worksheet Functions | |||
Nice pics | Excel Discussion (Misc queries) | |||
Allllen you rock!!! | Excel Worksheet Functions | |||
'Save current worksheet'; 'Open next worksheet' - two command buttons | Excel Discussion (Misc queries) | |||
Nice | Excel Discussion (Misc queries) |