+ Reply to Thread
Results 1 to 7 of 7

How to use multiple conditions to color 1 cell?

  1. #1
    Registered User
    Join Date
    08-15-2010
    Location
    FLORIDA
    MS-Off Ver
    Excel 2003-07
    Posts
    5

    Question How to use multiple conditions to color 1 cell?

    Ok,

    What I am trying to do is this. I have many columns but I want to look at 3 columns:

    A B C

    in column A, I want to look for the word "standard"
    in column B, I want to look for the number "3"
    in column C, i want to find any number greater than or equal to "3"

    The end result would cell fill with the color *red* the cell in column C (if all three are found)

    Not sure if a formula will work here or VB scripting (macro)

    please help

    Thanks!
    Last edited by camar0; 01-28-2011 at 07:21 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to use multiple conditions to color 1 cell?

    Select all 3 column and invoke conditional formatting.

    Select Formula Is (in 2003-) or Use formula to determine which cells to format (2007+) and enter

    =AND($A1="Standard",$B1=3,$C1>=3)

    where A1:C1 is top most row in your selection.

    Then click Format and choose appropriate pattern/fill.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to use multiple conditions to color 1 cell?

    NBVC appears to be offline and I think he missed the fact that you only want the col C cell to format.
    If that is the case just select that one cell as opposed to selecting all 3 and follow the rest of his advice.

  4. #4
    Registered User
    Join Date
    08-15-2010
    Location
    FLORIDA
    MS-Off Ver
    Excel 2003-07
    Posts
    5

    Re: How to use multiple conditions to color 1 cell?

    ok this does seem to work MANUALLY, however I need this in the personal macro book to use as the file I open changes daily

    The column with data I am looking for will be in the same columns.... I will be using multiple conditional formatting and this does not look promising with the first macro condition failing....


    So for the macro it shows:
    Please Login or Register  to view this content.

    It is doing its own weird random red coloring, such as putting a cell red that doesnt meet criteria... doesnt make sense...

    ideas?
    Last edited by Leith Ross; 01-26-2011 at 07:17 PM. Reason: Added Code Tags

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,977

    Re: How to use multiple conditions to color 1 cell?

    I didn't try to diagnose your code but I don't see why you need a macro to do this. What is it that changes every day? If the data changes, the conditional formatting stays in place. Does something happen to wipe out the formatting?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,977

    Re: How to use multiple conditions to color 1 cell?

    As for the code, if the data is in C2:C8 then your formula needs to correspond:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-15-2010
    Location
    FLORIDA
    MS-Off Ver
    Excel 2003-07
    Posts
    5

    Re: How to use multiple conditions to color 1 cell?

    Thanks for all the help... the issue with the strange formatting was due to using $A1 vs $A2.... working as intended now! THANKS!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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