+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting help - use info from 2 columns to format the 3rd column

  1. #1
    Registered User
    Join Date
    05-24-2014
    Posts
    5

    Conditional formatting help - use info from 2 columns to format the 3rd column

    I need help with conditional formatting in Excel. I have two columns with pertinent information. I need to know the following and format accordingly:

    1. Is the number in column A positive or negative?
    2. Is the number in column B less than 0.05 or 0.10?

    I would then like Column C to just be highlighted a certain color depending on the combination... there are 5 possible combinations and I would like the cells to be formatted so that:

    1. Positive and less than 0.05 - Bright yellow
    2. Positive and less than 0.10 - Pale yellow
    3. Negative and less than 0.05 - Bright green
    4. Negative and less than 0.10 - Pale green
    5. This "combo" just means the criteria wasn't meant... which is possible b/c sometimes Column A may have text instead of a number of b/c the number in column B is not less than 0.10. If either of these is true, I want the cell to remain blank.

    The colors themselves are not so important, but hopefully, I have clearly articulated what I need. I have struggled to get the conditional formatting to work and any help would be greatly appreciated - thanks in advance!!

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Conditional formatting help - use info from 2 columns to format the 3rd column

    The ordering and ensuring the 'stop if true' flag is critical. Something like this
    =AND(A1>0,B1<.1) is pale yellow
    then bright yellow
    then pale green
    then bright green

    'combo' would just be your default format for cells.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    05-24-2014
    Posts
    5

    Re: Conditional formatting help - use info from 2 columns to format the 3rd column

    I think part of my issue is I am not sure how to put multiple formulas (each with its respective format if conditions are met) all strung together so that everything appears in one column if that makes sense? Thanks for your response and any further help you can offer...

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Conditional formatting help - use info from 2 columns to format the 3rd column

    You dont indicate which version of excel you are using, we use that to tailor suggestions for you, so please update your profile

    If you have 2003 or earlier, you can only have 3 Conditional Format (CF) rules, if you have 2007, you have lots more rules. So I will assume 2007 or later...

    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =and(A2>0,B2<=0.05) format fill YELLOW
    Repeat 3 & $ with
    AND(A2>0,B2<=0.1)
    etc

    1. Positive and less than 0.05 - Bright yellow
    2. Positive and less than 0.10 - Pale yellow
    3. Negative and less than 0.05 - Bright green
    4. Negative and less than 0.10 - Pale green
    Note, you may need to adjust the sequence of the rules (move 1 up or down) and may need to check "stop if true"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    05-24-2014
    Posts
    5

    Re: Conditional formatting help - use info from 2 columns to format the 3rd column

    You are correct in assuming 2007 or later... thanks for your help!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Conditional formatting help - use info from 2 columns to format the 3rd column

    Glad it worked for you, and thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Conditional Formatting - Format row based on cell value in specific column
    By Kite3 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-08-2013, 12:23 AM
  2. Replies: 9
    Last Post: 08-10-2013, 08:28 PM
  3. [SOLVED] Conditional Formatting Columns Based on Text from Adjacent Column
    By mejiamang in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-18-2012, 10:41 PM
  4. Replies: 5
    Last Post: 05-03-2012, 06:06 PM
  5. [SOLVED] Conditional Formatting in one column using data in two columns
    By Renee in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-22-2006, 03:00 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1