Results 1 to 5 of 5

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

This is a discussion on Excel 2007 - Creating Color Text Using a Drop Down Menu / Macro... within the Excel Questions forums, part of the Question Forums category; Hello Everyone, I am using a spreadsheet to issue a pass or fail result for test I perform on hoses. ...

  1. #1
    Board Regular
    Join Date
    Nov 2010
    Location
    Sydney, Australia
    Posts
    51

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

    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...

  2. #2
    Board Regular mole999's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    2,974

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

    you can use Conditional Format to accomplish that

    Cell Value Is Equal To = "GREEN" and set the colour you want
    Yes I know there are better ways to do it. I just wish I knew them.

    I wear my ignorance openly, excel is not my chosen career, its a means to an ends

    Want to post well laid out questions and answers
    Settings > General Settings (on the left) scroll to the bottom, > Miscellaneous Options > Use ENHANCED

  3. #3
    Board Regular
    Join Date
    Nov 2010
    Location
    Sydney, Australia
    Posts
    51

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

    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 ?

  4. #4
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    69,579

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

    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.
    Microsoft MVP - Excel

  5. #5
    Board Regular
    Join Date
    Nov 2010
    Location
    Sydney, Australia
    Posts
    51

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

    Thanks Andrew, too easy...

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

    Thanks again for your assistance

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com