+ Reply to Thread
Results 1 to 3 of 3

Conditional Formats Not Working Properly When Copied

  1. #1
    Registered User
    Join Date
    11-02-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Conditional Formats Not Working Properly When Copied

    Hi there,

    I have created very specific conditional formats to switch on when certain logistical features are present in a booking. You will see that these work fine in the 'Conditional Formats' page of the workbook I've uploaded. However when copied to the 'New Data' page and applied to new data some of them become dysfunctional.

    For example the 'red' format is only meant to switch on when the 'Mode' column is 'Road', the 'Booker' column is greater than 0, the 'Origin Agent' is greater than 0, the Destination Agent is greater than 0, the 'Weight' column is greater than 0, the 'Estimated Departure Date' is greater than 0 and the 'Estimated Arrival Date' is greater than 0.

    As you will see most of the bookings in the 'New Page' highlighted red do not meet the conditions of this format but are still red. The bookings highlighted red in the 'Conditional Formats' page are correctly meeting these conditions.

    This happens throughout the 'New Page' with a number of the conditional formats I have copied over. I cannot see the logic at play here.

    Any help will be much appreciated.

    Rgds,

    Oscar.
    Attached Files Attached Files

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

    Re: Conditional Formats Not Working Properly When Copied

    In columns Y and AA of New Data, you have some sort of content that evaluates as >0 even though it looks blank. If you hit DELETE on those empty cells, the formatting returns to how you want it. How did you populate the data in that sheet?

    Using a comparison of >0 is good for numeric data, but not such a great way to check for blanks. I would use this formula, which is immune to the problem above:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Conditional Formats Not Working Properly When Copied

    This happens because you are using a condition that triggers something when a cell containing text is larger than 0.

    For instance M7 looks empty but is in fact a null text string.

    When excel compares the content of two cells it first compares the value of the TYPE information the cell contains (without you knowing)

    If you check the syntax of the TYPE() function you will see that TYPE(text) =2 and TYPE(number) =1. (and other values for other cell contents)

    The TYPE(M7) is thus=2 which is larger than TYPE(0) and thus returns TRUE - Your other conditions being satisfied you get a red formatting which is not what you want.

    If you change =AND(O6="Road",D6>0,K6>0,M6>0,U6>0,Y6>0,AA6>0) to =AND(O6="Road",D6>0,K6>0,M6<>"",U6>0,Y6>0,AA6>0) the formatting will change.

    The best thing to do would be to change all your conditions involving text to <>"" instead of >0

+ 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. [SOLVED] 2 Conditional formats but only 1 working
    By Dibbley247 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-14-2014, 07:10 AM
  2. [SOLVED] Conditional Formats .activate not working in Personal.xls
    By dlsmith36 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2013, 03:57 PM
  3. Conditional formats from 2007 not working in 2010
    By roskib in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-17-2013, 07:10 AM
  4. Conditional formatting not working properly
    By mlucey01 in forum Excel General
    Replies: 4
    Last Post: 01-08-2013, 08:35 PM
  5. [SOLVED] Conditional Formatting using VBA - Code not working properly
    By Tejas.T in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-07-2012, 10:19 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