-
I've been struggling with the below two Add-ConditionalFormatting calls. Neither returns an error but when I open the Excel file it claims its corrupted and I'm not getting the formatting I need. This call needs to color any row LightBlue when the text in column N has "true" in it. And this one should highlight the cell in column F if the text in column G has "True" in it: I've searched high and low and banged my head against a wall trying to get this to work, unsuccessfully, so if anyone has any tips I'd appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
One always figures it out, after they ask for help. I got it working. Add-ConditionalFormatting -Worksheet $ws -Range "A1:N$lastrow" -RuleType Expression -ConditionValue '=$N1="TRUE"' -BackgroundColor LightBlue Add-ConditionalFormatting -Worksheet $ws -Range "F:F" -RuleType Expression -ConditionValue '=$G1="TRUE"' -BackgroundColor Yellow |
Beta Was this translation helpful? Give feedback.
-
"talking to the rubber duck" refers to a debugging technique known as rubber duck debugging Glad you got it sorted. |
Beta Was this translation helpful? Give feedback.
One always figures it out, after they ask for help. I got it working.
Add-ConditionalFormatting -Worksheet $ws -Range "A1:N$lastrow" -RuleType Expression -ConditionValue '=$N1="TRUE"' -BackgroundColor LightBlue
Add-ConditionalFormatting -Worksheet $ws -Range "F:F" -RuleType Expression -ConditionValue '=$G1="TRUE"' -BackgroundColor Yellow