Conditionally remove conditional formatting icons? VBA?

Tarver

Board Regular
Joined
Nov 15, 2012
Messages
113
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have columns of ones (for True) that I format with an icon set. I want to see the green dot, not a one. This works well.

But I also have a Total line, and that total line isn't static. When a list of data ends, a formula adds "Total" in the next empty cell below. It's at that point that I want to total up my green dots and present them as a number.

However, I can't get conditional formatting to switch and turn off the icon at that point.

I've tried adding a new condition that covers that range that doesn't include icons. The icons prevail. I've tried changing the order of the conditions in the conditional formatting dialog box, but the icons remain. I've tried to change the values when an icon appears (so that >2 has no icon) but the cell remains blank in this case.

Is there a way to change the format back to the default when the line reads "Total" in column A?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
All conditional formatting has an 'applied to' range. Just change that to suit.
 
Upvote 0
Something like
=AND($A2<>"Total",$B2=1)
 
Upvote 0
All conditional formatting has an 'applied to' range. Just change that to suit.

That's the issue though. My range of data may be between 300 and 500 lines. A formula sees the end of the range of data and puts "Total" in column A. If I have to change the range of my conditional formatting, then I have to manually do that for every version of this report, for each person that gets a version. That defeats the purpose of automating the report.
 
Upvote 0
Something like
=AND($A2<>"Total",$B2=1)

I'd think that something like this would work, but in the icon set conditional formatting, there's not an option to enter a formula. Icon sets are displayed based upon a cell value.

So I thought I'd create a new condition to override the icon set with something like you suggest, but it doesn't replace the icon set. It only sets a format for that cell that's already filled with an icon.

I'm thinking that VBA may be the way to scan the column for a Total entry in column A and then eliminate the conditional formatting from that row down, but I'm not a great VBA expert and don't have the time to try to code this this week only to discover it can't be done. I was hoping someone could tell me if VBA would work in this situation, or if there were some other way to make a Conditional Format in icon sets conditional on some other value.
 
Last edited:
Upvote 0
Rather than use Icon sets you can use a formula & set a custom format to show a ● which you can then colour by changing the font colour
 
Upvote 0
eg

=A2="total"

applied to B2:B1000. Check stop if true. Then your icon set below that applied to same range B2:B1000.
 
Upvote 0
The suggestion to use "Stop if true" is brilliant! Thank you!

In all my years of Excel, I've never used this. I have to move my icon sets to the bottom row of my conditions, and then put my "=IF($A4="Total",TRUE,FALSE) on the line above it, but when I checked the "Stop if true" box, it worked like a charm.

Thank you all!
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top