+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting Based on Adjacent Cells and Values

  1. #1
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Question Conditional Formatting Based on Adjacent Cells and Values

    Hey All,

    I'm trying to create conditional formatting that basically lets the user know which cells need to be filled in. There's a serial number that's filled in a cell that has 3 digits, one for each line up, where each digit represents the quantity of parts in each line up. So, I may have a serial no that says "431". What I'd like to do is have the first 4 cells in the first column turn orange (A1:A4), the second column is based on the second digit (3), so 3 cells would turn orange in the second column (B5:B7), and the last digit is a 1, so the third column would fill in C8 orange. If it isn't orange, it's striped.

    Tough to explain, easy with an example. Please see attachment.

    I just can't figure it out, maybe the gurus here have some slick ideas. Thanks for any help
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Conditional Formatting Based on Adjacent Cells and Values

    Add these Conditional Format rules
    First column Rule (column F)
    =IF(MID($B$2,3,1)+0<ROW(I8)-7,FALSE,TRUE)

    Second column Rule(column G)
    =IF(MID($B$2,4,1)+0<ROW(I8)-7,FALSE,TRUE)

    Third column Rule (column H)
    =IF(MID($B$2,5,1)+0<ROW(I8)-7,FALSE,TRUE)
    Click on star (*) below if this helps

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Conditional Formatting Based on Adjacent Cells and Values

    @K m: So you tie the results with constant seri 431

    I suggest the 3 criterias should be applied in B8,C8,D8 and copy/paste special/format down:
    Please Login or Register  to view this content.
    Quang PT

  4. #4
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Conditional Formatting Based on Adjacent Cells and Values

    bebo: No, as the number changes so does the conditional formatting

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Conditional Formatting Based on Adjacent Cells and Values

    Quote Originally Posted by K m View Post
    bebo: No, as the number changes so does the conditional formatting
    It seems you followed the left table. The OP expect to follow the right table

  6. #6
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Re: Conditional Formatting Based on Adjacent Cells and Values

    The table on the left (Column BCD) is the table I'm trying to get working. The table on the right (Column FGH) is an example of how it should look using the sample model number. Alas, I have not been able to get either solution to work yet... but I'm still trying

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Conditional Formatting Based on Adjacent Cells and Values

    I think it is so clear:
    OP said:
    What I'd like to do is have the first 4 cells in the first column turn orange (A1:A4), the second column is based on the second digit (3), so 3 cells would turn orange in the second column (B5:B7), and the last digit is a 1, so the third column would fill in C8 orange. If it isn't orange, it's striped
    The right table should be right result

  8. #8
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Talking Re: Conditional Formatting Based on Adjacent Cells and Values

    Okay, with the help of you all, I think I've got it (written as a formula, not conditional formatting):

    Please Login or Register  to view this content.
    Couldn't have done it without you

  9. #9
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Re: Conditional Formatting Based on Adjacent Cells and Values

    Didn't think about the fact that I was using the SUM function in my formulas, so it messed up when I applied it to the conditional formatting. Below is the correct code.

    Note to self: Make sure everything you type is awesome before hitting "Post".

    Please Login or Register  to view this content.
    Thanks again all - you've been a great help

+ 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