ACommandLineKindaGuy
Active Member
- Joined
- May 11, 2002
- Messages
- 378
- Office Version
- 365
- Platform
- Windows
Now this is really wierd.
Cells B14:N23 on the "Directs" sheet have a single conditional formula that checks a condition with the particular cell as well as an absolute reference to cell M8.
eg, Cell B14 conditional format formula is =AND(B14<>"",$M$8="")
I want to strip the absolute reference to M8 in each cell to get =AND(B14<>"",M8=""), so here's what I wrote:
The problem is that now, cell C15 for example has a conditional format formula of =AND(C15<>"",N9="") when it should read =AND(C15<>"",M8="")
What the heck is going on?
SOLUTION: add the line
as the first line in the For Each routine
I just love how I never seem to get any responses to my posts. Gives me a nice warm fuzzy.
Cells B14:N23 on the "Directs" sheet have a single conditional formula that checks a condition with the particular cell as well as an absolute reference to cell M8.
eg, Cell B14 conditional format formula is =AND(B14<>"",$M$8="")
I want to strip the absolute reference to M8 in each cell to get =AND(B14<>"",M8=""), so here's what I wrote:
Code:
For Each c In Worksheets("Directs").Range("B14:N23")
s1 = .FormatConditions(1).Formula1
s1 = Replace(s1, "$M$8", "M8", 1)
.FormatConditions(1).Modify xlExpression, , s1
Next
The problem is that now, cell C15 for example has a conditional format formula of =AND(C15<>"",N9="") when it should read =AND(C15<>"",M8="")
What the heck is going on?
SOLUTION: add the line
Code:
c.Activate
I just love how I never seem to get any responses to my posts. Gives me a nice warm fuzzy.