Flashing Cell Background

snichols

New Member
Joined
Jan 14, 2005
Messages
13
I realize that there have been numerous posts about this question and I have read through almost all of them, however, I cannot seem to get any of them to work. I will first admit that I know next to nothing about using macros with excel, but here is what I would like to accomplish.

Cell E5 is a value that must be entered manually and it must meet the following criteria, it must be a multiple of 6 and it must be >= to 54 and <= 192. That part is easy!

Now merged cells G5:M5 have the following formula,

=IF(AND(MOD(E5,6)=0,E5>=54,E5<=192),"WALL HEIGHT O.K.",IF(AND(MOD(E5,6)>0,E5>=54,E5<=192),"ERROR! WALL HEIGHT MUST BE IN 6" INCREMENTS!",IF(AND(MOD(E5,6)>=0,E5<54),"ERROR! WALL HEIGHT MUST BE 4'-6" MINIMUM","ERROR! WALL HEIGHT MUST BE 16'-0" MAXIMUM!")))

This formula works fine for the text, however the Big Boss Man would like it to have more of a visual impact if the person enters data that is not within the set parameters. I would like to be able to have the background be Green and not flash if the First IF statement is met "WALL HEIGHT O.K.", if either of the ERROR statements are met I would like to have the background flash Red, is this possible and if so could you be very explicit as to how to go about it. Thanks in advance for any help!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi, here my point of view:

Instead of allowing mistakes and then flash cells, couldn't you validate your E5-cell?
=AND(MOD(E5,6) = 0,E5>=54,E5 <= 192)
if you put this in the formulabox of "custom" validation
no bad entries can be made

kind regards,
Erik
 
Upvote 0
Erik,
I like your idea and I added it to the cell, but the Boss wanted something that told the user why the data was incorrect, hence the Error message in the merged cells. I would still like to have the background flash red if the data is incorrect, I also appreciate the other replies, but you must have missed the part about me not knowing squat about macros. I am sure those macros would probably work, but I have no idea how to adapt them to my problem.
Thanks to all!!
 
Upvote 0
Hello,

In fact you can tell the user what's wrong: just go to the other TABS in the validationbox. NO code needed.

If you nevertheless still are obliged to use macros, I hope the guys who gave you the links will help you further, cause my time is limited at the moment.
To use code:
start the Visual Basic Editor (via Menu Tools, Macro or press ALT+F11).
On the Insert menu in the VBE, click Module. (if necessary)
In the module (the white area at the right), paste the code there.

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,749
Members
449,094
Latest member
dsharae57

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