+ Reply to Thread
Results 1 to 17 of 17

Select latest of 3 dates and skip blank cells

  1. #1
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Select latest of 3 dates and skip blank cells

    Hello all.

    First post on the forum after trying for some time to solve a problem which I believe someone will be able to solve quite easily on here.

    I am trying to find the latest of 3 dates in 3 seperate columns and display it in a seperate column. I have used the Max function which seems to work but my sheet will have one or two of the columns blank on occasions. Currently it is showing 00/01/00 using the max formula. I need to skip the blanks somehow.
    Last edited by Skully; 06-08-2011 at 04:08 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Select latest of 3 dates and skip blank cells

    try =LOOKUP(9.999E+307, A:A) for each column

  3. #3
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    Sorry to be a pain but the cells I am involving are H17,I17,J17

    How do I encompass these into the formula you suggested?

    Thanks

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Select latest of 3 dates and skip blank cells

    I think that MAX should work. If you use the formula

    =MAX(H17:J17)

    what do you get?

    That should only return 00/01/00 (which is zero formatted as a date) if all 3 cells are blank or if there are dates in the cells which are text-formatted and not recognised as dates.

    To avoid getting 00/01/00 when all 3 cells are blank use a custom format of

    dd/mm/yy;;

    Note the 2 semi-colons.....

    If the above doesn't work then I suggest that your dates aren't true dates (they are text), what do you get with

    =COUNT(H17:J17)

    What do the dates look like, where do they come from, are they generated by formulas or something else?
    Audere est facere

  5. #5
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    Ahhh daddylonglegs. I think a light has just sprung on in my head. I think you are correct with the blank cells being formatted incorrectly. You have no idea how much this has bugged me.

    I'm away to try this.

  6. #6
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    I first formatted my cells with the dates in them which are entered manually and are not generated from anywhere else, then used the max forumula as described. The cell I entered the formula in is now just blank ?? Nothing. Tried the count formula and the same result. Checked the font etc which is set to automatic??

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Select latest of 3 dates and skip blank cells

    Can you upload example workbook?

  8. #8
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    I'm sure I can if you give me some instuction on how to do this
    Attached Files Attached Files
    Last edited by Skully; 06-07-2011 at 09:15 AM.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Select latest of 3 dates and skip blank cells

    Go to your last post. Click edit.
    Click go advanced.

    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

  10. #10
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    Does the upload shed any light?

  11. #11
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    I should also say that it is 2010 I am using which I just noticed, if that makes any difference?

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Select latest of 3 dates and skip blank cells

    If I open your file and put this formula in F3

    =COUNT(A3:C3)

    Then the result is 0......this means your "dates" are not real dates but text (otherwise they would be numbers and COUNT counts numbers).

    Try converting to true dates like this:

    Put a zero in any blank cell and copy that cell.
    Select columns A to C
    Edit > Paste Special > under "operation" select "Add" > OK > ESC. Now you have converted to dates and blank cells will show zero. Format as

    mm/dd/yy

    ....to hide zeroes and get consistent date formats

    Now use

    =MAX(A3:C3) in F3 copied down

    format column F the same way

  13. #13
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    I got the formatting the cells to mm/dd/yy step. I am using the UK version of dd/mm/yy will that make a difference?


    I formatted the entire range using the standard date formatting and not custom.


    The blank cells are showing 00/01/00??

    Also if I now try the =COUNT(A3:C3) again is still comes up as zero
    Last edited by Skully; 06-07-2011 at 10:57 AM.

  14. #14
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Select latest of 3 dates and skip blank cells

    You need to do this part - that's crucial - I meant dd/mm/yy......

    Quote Originally Posted by daddylonglegs View Post
    Put a zero in any blank cell and copy that cell.
    Select columns A to C
    Edit > Paste Special > under "operation" select "Add" > OK > ESC. Now you have converted to dates and blank cells will show zero. Format as

    dd/mm/yy

  15. #15
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    I follow that stage and it changed the columns to number format with the dates showing as numbers and the blanks showing as zeros. It was the next step of formating where I appeared to have the problem and the dates appeared but the blanks (now zeros) then changed back to 00/01/00

  16. #16
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Select latest of 3 dates and skip blank cells

    OK, sorry, you still need to custom format with the version I suggested earlier with two colons at the end, e.g.

    dd/mm/yy;;

    that will suppress the zeroes

    MAX formula should work, though - with or without that formatting step......

  17. #17
    Registered User
    Join Date
    06-07-2011
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Select latest of 3 dates and skip blank cells

    Absolutely Tip Top. Working perfectly. Thanks very much for your help. That was very frustrating.

+ 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