+ Reply to Thread
Results 1 to 8 of 8

Count and Highlight date greater than 1 day

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    Bahrain
    MS-Off Ver
    2010
    Posts
    11

    Arrow Count and Highlight date greater than 1 day

    Hello,

    Is there a way to count date between (Start Date , Finish Date ) > 1 to be highlighted ?
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Count and Highlight date greater than 1 day

    Could you show us what your expected results would be?

    BSB

  3. #3
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Count and Highlight date greater than 1 day

    I can't view your attached image, but if your request is as straightforward as I'm interpreting it to be - you want to highlight all entries in which the finish date is more than a day after the start date - you should be able to select A2:B5 then use the formula below as your Conditional Formatting formula:

    =$B2-$A2>1

  4. #4
    Registered User
    Join Date
    03-10-2015
    Location
    Bahrain
    MS-Off Ver
    2010
    Posts
    11

    Arrow Re: Count and Highlight date greater than 1 day

    cantosh,
    I try It did not work, For example what I did is
    as you explain in the image.

    https://s3.postimg.org/5ez38vgv7/image.png
    Attached Images Attached Images

  5. #5
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Count and Highlight date greater than 1 day

    Try following the formula path instead of the 'highlight greater than' path. To clarify:

    1. Select A2:B5
    2. Click 'Conditional Formatting' --> 'New Rule'
    3. Click 'Use a formula to determine which cells to format'
    4. In the 'Format values where this formula is true' box, enter the following:
    =$B2-$A2>1
    5. Click 'Format', select the 'Fill' tab, pick your highlight color, and select 'OK'
    6. 'OK' through the rest of the process

    I've attached a sample if you need it. It's worth noting that the Nov. 31 date in your original sample does not exist as a date (30 days in Nov.), so Excel doesn't really know what to do with it.

    Hope this helps!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-16-2016
    Location
    Yorkshire, UK
    MS-Off Ver
    2010
    Posts
    7

    Re: Count and Highlight date greater than 1 day

    If you want Column C to show the number of days between the Start Date and Finish Date then you need a formula like the one below in cell C2

    =IF(A2<B2,DATEDIF(A2,B2,"D"),"Start date after Finish Date")

    You can then drag this down the column. The IF statement just checks to make sure the Start Date is before the Finish date to avoid an error.

    If you want to highlight values you would just do similar to what you did above but just enter the value 1 in the box - in this case it will highlight all rows though.

  7. #7
    Registered User
    Join Date
    03-10-2015
    Location
    Bahrain
    MS-Off Ver
    2010
    Posts
    11

    Re: Count and Highlight date greater than 1 day

    cantosh,

    Thank you It worked

    Andrew Crystal,
    Yes I check it, as It shows total count of difference between two dates, I think this formula also work correct ? which is more easy

    =DAYS360(A2,B2)
    A2= Start Date
    B2= End Date

    but after finish you need at least sort them from filter and highlight them manually

  8. #8
    Registered User
    Join Date
    08-16-2016
    Location
    Yorkshire, UK
    MS-Off Ver
    2010
    Posts
    7

    Re: Count and Highlight date greater than 1 day

    Hi,

    You need to be careful using the DAYS360 forumula as it is based on 360 days in a year not 365, and it also assumes that each month has 30 days - as far as I know it's mainly used in accounting and you can see more about it here - https://support.office.com/en-gb/art...f-0cbda5718c2a

    It isn't something I've really used but suspect that it won't really work how you want it to.

+ 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: 3
    Last Post: 02-12-2016, 11:15 AM
  2. [SOLVED] Formula to highlight cell/data greater than a specific date
    By tdsmith14 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2013, 05:44 AM
  3. [SOLVED] count if greater than date in cell E1.
    By ea223 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-22-2013, 08:00 PM
  4. [SOLVED] Highlight the Cell which is greater than Next Friday's Date
    By vigneshwaran in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-27-2012, 07:04 AM
  5. Replies: 5
    Last Post: 07-03-2012, 01:23 PM
  6. Replies: 3
    Last Post: 01-18-2012, 12:12 PM
  7. How to count rows if greater than date?
    By jgomez in forum Excel General
    Replies: 4
    Last Post: 07-12-2011, 01:38 PM

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