+ Reply to Thread
Results 1 to 6 of 6

changing row colour depending on multiple cell values

  1. #1
    Registered User
    Join Date
    11-14-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    changing row colour depending on multiple cell values

    Hey guys,

    I have an excel sheet in which I would like to automatically change the row colour depending on the value of several cells.
    The cols are I,J and K.
    The value is either \n or date+time.

    So what I tried to do was:
    if the length value of cell I > 2 and length value of J & K are < 3 colour the row red.
    if the length value of cell I & J are > 2 and the length value of K < 3 colour the row yellow
    if the length value of I & J & K > 2 colour the row green.

    But I don't think I am smart enough to make this work,
    If there is anyone that can help me out with this I would really appreciate it.

    TA
    Last edited by Erikp; 11-15-2011 at 06:57 PM. Reason: solved

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

    Re: changing row colour depending on multiple cell values

    To do this I would use three rules specifying "Formula is", corresonding to the three conditions you describe. This assumes the rules are for row 1. Once you set them up for one row, you can use Format Painter to apply to as many rows as desired.

    =AND(LEN($I1)>2,LEN($J1)<3,LEN($K1)<3)
    =AND(LEN($I1)>2,LEN($J1)>2,LEN($K1)<3)
    =AND(LEN($I1)>2,LEN($J1)>2,LEN($K1)>2)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-14-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: changing row colour depending on multiple cell values

    Sorry to say that means absolutely nothing to me.
    What I am trying to do is create a macro that will colour the rows according to the above requirements.

  4. #4
    Registered User
    Join Date
    11-15-2011
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: changing row colour depending on multiple cell values

    See if this helps you out:

    Please Login or Register  to view this content.

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

    Re: changing row colour depending on multiple cell values

    My formulas are for Conditional Formatting. A macro is not necessary.
    Last edited by 6StringJazzer; 11-15-2011 at 09:42 AM.

  6. #6
    Registered User
    Join Date
    11-14-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: changing row colour depending on multiple cell values

    Thanks mate,
    That was exactly what I was looking for :D

+ 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