If conditions are met grey out cells, else reinstate originals

julhs

Active Member
Joined
Dec 3, 2018
Messages
476
Office Version
  1. 2010
Platform
  1. Windows
I want to temporarily re-format (grey out) all cells in a specific range when/if a condition is meet, so "=True".
The existing formatting for the range is a mixture of; fill colour, text colour BUT also Condition Formatting
But when/if the condition no longer "=TRUE", I want to reinstate the ORIGINAL formatting.
As a further note; I can’t just hide the relevant columns/rows, what I’m trying to do HAS to be achieved by formatting in some way.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
conditional formatting - PUT your rule at the top of the list and then click on STOP IF TRUE
if the condition is met - it will grey and then stop and not look at any other rules
if its not true - it will go on the next rule

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Thanks for response etaf
Your comments now make me believe I was over complicating this!!
I had thought of just doing this with additional CF rules as you suggested, but thought a VBA method would be easier.
I'll do what you suggested with CF rules and forget a Vba method.
 
Upvote 0
VBA maybe the way - in the end , I dont provide VBA solutions on forums
 
Upvote 0
Appreciate your point re VBA, that can turn out to be pain in the proverbial for likes of yourself.

But this is going to seem extremely lazy on my behalf, BUT it may avoid me having to come back to you later.
The condition to be met is; if a specific shape is NOT visible then apply greying format, is this possible with CF rule??
If so, what would be your suggestion be for the CF rule??
Otherwise it's back to a VBA method.
 
Upvote 0
Rich (BB code):
If ActiveSheet.shapes("btnBlaBla").Visible Then

Do something …………………
 
Upvote 0
sorry thats VBA and i dont do VBA here
Sounds like you need VBA , otherwise no idea how to do shapes in conditional formatting
Maybe worth Asking a Moderator - VIA report - to delete all these posts and actually change the original post to point out its SHAPES & VISIBLE
Not just
when/if a condition is meet, so "=True".
 
Upvote 0
Ok, I’ll see if I can get that done.
Thanks for your interest though.
Julhs
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,105
Members
453,021
Latest member
Justyna P

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