+ Reply to Thread
Results 1 to 16 of 16

Conditional Formatting Separate Columns

  1. #1
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Conditional Formatting Separate Columns

    I am attempting to apply conditional formatting for two separate columns but with the same conditions.

    When I apply the following formula:

    Please Login or Register  to view this content.
    Capture.JPG

    Everything works as expected for column U, but not for column D.

    In column D some cells get the formatting, but others do not.



    Anybody have suggestions?
    Attached Files Attached Files

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    I hate to say it, but on my machine it seems to work fine.
    Did some testing and can't find the formatting of cells in column differ from the corresponding cells in column U.
    See attachment.
    Can you upload an example showing cells where formatting is unexpected?
    Maybe I'm overlooking something.
    Attached Files Attached Files
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    Thanks for taking a look!.

    Here is what i see:
    Missing Formatting.JPG

    Some of the 18131 have the formatting, some don't.

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    According to the CF-formula the date in column AE should be 41604 (26-11-2013).
    That's only the case with the formatted cells.

  5. #5
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    Here was my attempt:

    The CF Formula: =AND($AE1=41604,(COUNTIF(TS_List!$A:$A,$U1)))

    In Plain language-

    AE1 = 11/26/13 AND Sheet TS_List(hidden tab) column A contain the same data as in U1= True.

    Is the Formula incorrect as well?
    Last edited by Remotruker; 03-26-2015 at 05:35 PM. Reason: Removed 11/26/16 and replaced with 11/26/13

  6. #6
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    AE1 = 11/26/16
    I think this part is the culprit.
    Technically it's OK, but apparently functionally it's not because the results are not what you expect.
    Also you must understand that the condition does not look at AE1, but at the date in the cell in column AE which is in the same row as the item#.
    So if the item is in cell D6 it looks at the date in cell AE6. In that case the condition is true. But e.g. for the item in cell D8 the date in cell AE8 = 8/12/14.
    BTW, datevalue 41604 is 11/26/13.

    So I think with AE1 = 11/26/16 you actually mean to establish something else.

  7. #7
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    11/26/16 was a typo, should have been 11/26/13

    Yes, I understand the correlation of AE and Item # in the same row.

    Ultimately i don't understand why it seems to be working just fine for Column U, but when i apply the same CF to Column D, it does not appear to work.

    Quote Originally Posted by Tsjallie View Post
    I think this part is the culprit.
    Technically it's OK, but apparently functionally it's not because the results are not what you expect.
    Also you must understand that the condition does not look at AE1, but at the date in the cell in column AE which is in the same row as the item#.
    So if the item is in cell D6 it looks at the date in cell AE6. In that case the condition is true. But e.g. for the item in cell D8 the date in cell AE8 = 8/12/14.
    BTW, datevalue 41604 is 11/26/13.

    So I think with AE1 = 11/26/16 you actually mean to establish something else.

  8. #8
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    As far as I can see the conditional formatting in column D behaves exactly the same as in column U.
    Just hide all the columns except columns D, U and AE. Then you will see that on each row where the date is 11/26/13 the cells in both column D and U are formatted.
    With all other dates they're not. Which is (technically) correct according to the formula.

    Why are you using the fixed date? That worries me.

  9. #9
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    Ok, maybe i can take a step back.

    Goal: If AE5 = 11/26/13 AND TS_List! A:A contains the same data as U5: Format U5 and any cell in D that matches U5. The Cell in D may NOT be in the same row.

    Reason for the fixed date- it signifies whether or not an action needs to occur. Any date (or blank) that is not 11/26/13, no action needs to be taken, and thus does not need to be Formatted.

    Perhaps VBA would be a better avenue.

  10. #10
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    The Cell in D may NOT be in the same row.
    Not sure what you mean by this.
    Do you mean that if a cell in column U is formatted then all the cells in column D having the same value as that cell in column U should be formatted.
    If that's the case then you should remove the date condition form the cf-formula in column D.
    I don't think you need to turn to vba (yet).

  11. #11
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    Thx for the rep
    Problem solved?

  12. #12
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    No, I just have to change my focus to a higher priority project. Back burner for a while...

  13. #13
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    Ok, after some coffee, a nights sleep and re-reading this thread- I get what you are saying about the relationship of IE and Item in the same row. And, you are right it IS working correctly, I just wasn't getting the result i was expecting.

    Back to the beginning-

    Columns R thru AE are a list of work orders i need to schedule
    R is a work center
    AE is an indicator of the last time a time study was conducted.

    The Conditional Format will identify which Item Numbers need a new time study: It compares sheet TS_List Column A item numbers to U AND has a TS date of 11/26/13.
    CF Formula for Column U: =AND($AE1=41604,(CountIf(TS_List!$A:$A,$U1))) - This works

    The Copy button on each row- This matches the Work Center in R to a Work Center in B, then finds the next open row(i believe this is what causes the CF to not work as expected) and pastes the data S thru AC.

    All i want- If the CF formatted a Cell in U, when it is copied to new row in B, keep the formatting.

    CF Formats the cell, not the data in the cell so when copied, it does not move with the data.

    In the example, S6:AC6 where "18131" is formatted, it could land in B(any row):L(any row) when the copy button is clicked. So, its relation to the criteria breaks down.

    Since I'm using a macro to Copy to its new location anyway... perhaps VBA is a better alternative?

  14. #14
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    Ok, got the picture and think I solved it.
    Because the rows copied to the Work Center can end up on an other row an extra condition is needed.
    I used the WO Number for that as that looks like a unique id. Just hope in reality that's also the case.
    Altered the original cf to only refer to column U and introduced an new cf for column D.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Not sure if you're familiar with the sumproduct function. Sheet "Blad" shows what happens when the formula is evaluated.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    03-02-2006
    Location
    USA
    MS-Off Ver
    O365 PC, Version 2207, 64bit
    Posts
    63

    Re: Conditional Formatting Separate Columns

    Interesting solution. Excel amazes me just about every day with what can be done...

    Thanks again!

  16. #16
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Conditional Formatting Separate Columns

    You're welcome.
    If you're problem is solved pls mark this [SOLVED].

+ 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. Replies: 1
    Last Post: 01-15-2015, 03:06 PM
  2. [SOLVED] Conditional Formatting - Separate Rows
    By Nick_Long in forum Excel General
    Replies: 7
    Last Post: 06-21-2014, 12:36 PM
  3. Conditional formatting based upon 2 separate cells
    By jignaczak in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2013, 04:28 PM
  4. Conditional formatting on separate sheets
    By FDT22 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 01-21-2013, 04:39 PM
  5. Conditional formatting from separate pages
    By HuskerBronco in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-25-2008, 08:35 AM

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