Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

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

  1. #1
    Board Regular
    Join Date
    Nov 2010
    Location
    Sydney, Australia
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Moderator mole999's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    8,247
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    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. - 2003, 2007, 2010, 2013 & 2016
    • I wear my ignorance openly, excel is not my chosen career, its a means to an ends
    • Posting Guidelines Want to post well laid out questions and answers Translate Excel Versions
      Code:
      [CODE ]Put Your Code[/ CODE]
    • Settings > General Settings (on the left) scroll to the bottom, > Miscellaneous Options > Use ENHANCED
    • X-Posting Guidelines Rule 13 > CHART STUFF

  3. #3
    Board Regular
    Join Date
    Nov 2010
    Location
    Sydney, Australia
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    73,092
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

User Tag List

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