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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
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
 

snichols

New Member
Joined
Jan 14, 2005
Messages
13
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!!
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
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
 

Forum statistics

Threads
1,147,843
Messages
5,743,509
Members
423,800
Latest member
IuneKeiki

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
Top