+ Reply to Thread
Results 1 to 11 of 11

Conditional Format (underline) row of last date/time of each day in a range

  1. #1
    Registered User
    Join Date
    11-30-2016
    Location
    Portsmouth, Virginia
    MS-Off Ver
    2016
    Posts
    11

    Conditional Format (underline) row of last date/time of each day in a range

    Good day,

    I am attempting to underline the row (A:D) that contains the last occurrence of a date/time in range of numerous chronologic dates/times. Essentially I just need to add visual aid to the spreadsheet to make the transition from one day to the next more clear. I have been able to do this (in the past) with only dates. But adding the time element has pushed me into deeper "excel" waters. For further detail, the range that I am working with is not raw data, rather it is populated via index-match array fx from a separate data entry sheet. See screenshot.

    SOF.jpg

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,208

    Re: Conditional Format (underline) row of last date/time of each day in a range

    Attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional Format (underline) row of last date/time of each day in a range

    is this based on A or B or both ?

    =NOT(INT($A2)=INT($A3))
    should underline

    but as suggested lets see an example
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    11-30-2016
    Location
    Portsmouth, Virginia
    MS-Off Ver
    2016
    Posts
    11

    Re: Conditional Format (underline) row of last date/time of each day in a range

    Thanks,

    This is a pretty big file (over 5mb) so I can not attach. Am working to mock something up now. To answer your question is based on data in col-A only.

    Peter H.

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional Format (underline) row of last date/time of each day in a range

    then
    =NOT(INT($A2)=INT($A3))
    if you select the range A2:A????

    if you just want to select A
    then
    =NOT(INT($A1)=INT($A2))
    BUT it will underline the header

  6. #6
    Registered User
    Join Date
    11-30-2016
    Location
    Portsmouth, Virginia
    MS-Off Ver
    2016
    Posts
    11

    Re: Conditional Format (underline) row of last date/time of each day in a range

    etaf,

    Your solution works perfectly. Would you mind explaining it to me?

    Thanks very much

    Peter H.

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional Format (underline) row of last date/time of each day in a range

    so the date is a number from 1/1/1900
    if you right click on a cell and change format to general
    you will see a number
    today() 12th Dec is 42716
    the time is the decimal part of the number
    so 6:00 am is
    0.25
    1/4 of a 24hr day

    so to see if a date changes - from one cell to the next , we just need to see if the date number are the same between the rows
    BUT of course the times will not be
    so INT()
    gets rid of the time and so now we are just comparing the date

    does the date value in cell A2 = Cell A3 if it does and the same date , move on

    INT(A2)=INT(A3)

    BUT conditional formatting is applies if TRUE
    so if they are the same date it will be TRUE
    if they are NOT the same date - then false , i need to change it now so that TRUE = FALSE and FALSE = TRUE
    hence the
    NOT()

    Just thought, we could have done
    INT(A2)<>INT(A3)

    any way - thats how it works, if still dont follow - say which bit and i will try to explain again

  8. #8
    Registered User
    Join Date
    11-30-2016
    Location
    Portsmouth, Virginia
    MS-Off Ver
    2016
    Posts
    11

    Re: Conditional Format (underline) row of last date/time of each day in a range

    I follow 100%, I'd heard of INT but never delved into or used before. Presume INT to be an abbreviation for integer. So in essence with INT you are "calling" only the INT data?

    Peter H.

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional Format (underline) row of last date/time of each day in a range

    yes,INT() just takes the integer and removes the decimal
    or we could use
    TRUNC()
    to do the same thing

    to get just the decimal
    then
    cell - INT(Cell)

  10. #10
    Registered User
    Join Date
    11-30-2016
    Location
    Portsmouth, Virginia
    MS-Off Ver
    2016
    Posts
    11

    Re: Conditional Format (underline) row of last date/time of each day in a range

    Outstanding!

    Thanks for the lesson. This will be a really valuable tool.

    Peter H.

  11. #11
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional Format (underline) row of last date/time of each day in a range

    you are welcome

+ 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] Conditional format cell colour if time between a range
    By susansmith32 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-27-2016, 10:44 AM
  2. [SOLVED] Conditional format if date falls in range
    By pauldaddyadams in forum Excel General
    Replies: 3
    Last Post: 12-09-2015, 01:45 PM
  3. [SOLVED] Conditional format Date/time that is 16 hours greater or Less
    By smugglersblues in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 04:42 PM
  4. Excel 2007 Conditional Format date range
    By thomasoj01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2014, 05:49 PM
  5. [SOLVED] Sum Range of Cells with Date Time format
    By Oceans in forum Excel General
    Replies: 4
    Last Post: 11-21-2012, 03:02 PM
  6. Excel 2007 : conditional format based on date range
    By Rob U Blind in forum Excel General
    Replies: 1
    Last Post: 10-21-2011, 09:41 AM
  7. Conditional format range based on date
    By sd7000 in forum Excel General
    Replies: 2
    Last Post: 09-08-2009, 03:53 PM

Tags for this Thread

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