Excel 2007 - Creating Color Text Using a Drop Down Menu / Macro...

CDNWolf

Board Regular
Joined
Nov 14, 2010
Messages
71
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

I am using a spreadsheet to issue a pass or fail result for test I perform on hoses. I select Pass or Fail from a standard name defined list but I want the Pass to be the color Green and Fail to be in Red. Simply coloring the name defined cells accordingly as you know does not work as I found out...

I use a macro to save the file, print out the report, drop the data into the database and clear the required cell contents ready for the next test info.

If I can incorporate a formula in the macro to change the color accordingly I would be very happy.

Thank you in advance for your assistance...
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
you can use Conditional Format to accomplish that

Cell Value Is Equal To = "GREEN" and set the colour you want
 
Upvote 0
Hello Mole999,

I have already looked into conditional formatting and I am not sure how to apply a formula to suit my needs...

Could you explain it to me ?
 
Upvote 0
In Conditiona Formatting select 'New Rule' then 'Use a formula to determine which cells to format'. Enter a formula like:

=A1="Pass"

and choose a green fill format. Repeat the process with the formula:

=A1="Fail"

and choose a red fill format.

Note that the formula assumes A1 is active when it is entered. Adjust the reference to suit.
 
Upvote 0
Thanks Andrew, too easy...

I thought I had to do a usual if statement and it wasn't working...

Thanks again for your assistance
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,412
Members
448,960
Latest member
AKSMITH

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