+ Reply to Thread
Results 1 to 11 of 11

Show the date in the three columns (even when two or three columns have no date entry)

  1. #1
    Forum Contributor
    Join Date
    02-05-2021
    Location
    Netherlands
    MS-Off Ver
    Microsoft Excel 365 (version 2022, Build 14931.20764)
    Posts
    182

    Show the date in the three columns (even when two or three columns have no date entry)

    Dear Excel-specialists,

    I have a short question, but first some additional context, including an attachment (the picture on the right provides a better idea of my challenge).

    I have 4 columns (L:O)

    Per row a person filles in 1, 2 or 3 dates --> column (L:N).

    Column O shows the date that is closest/nearest to the current date (based on the dates that are entered in L, M, N)
    This works perfectly, but if only 1 or 2 dates are entered, column O will not show a date.

    Does somebody know what I am doing wrong?

    I use this formula in the rows in column O --> (first formula is in Dutch, the other one in English).


    =ALS(AANTAL(L3:N3)<3;"";MIN(L3:N3))

    =if(count((L3:N3)<3;"";MIN(L3:N3))

    Thank you in advance for an answer. :-)
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,649

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    There are instructions at the top of the page explaining how to attach your sample workbook (NOT screenshots of it).

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-05-2021
    Location
    Netherlands
    MS-Off Ver
    Microsoft Excel 365 (version 2022, Build 14931.20764)
    Posts
    182

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    Done :-) I added the Excel-file.

  4. #4
    Forum Contributor
    Join Date
    02-05-2021
    Location
    Netherlands
    MS-Off Ver
    Microsoft Excel 365 (version 2022, Build 14931.20764)
    Posts
    182

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    This is the Excel- file.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,649

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    Thanks - that's confirmed it for me:

    =IF(COUNT(A3:C3)=0,"",MIN(A3:C3))

    For the Dutch locale:

    =ALS(AANTAL(A3:C3)=0;"";MIN(A3:C3))

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,427

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    That gives the minimum date... not the closest date to today... Maybe that's what you want...

    This gives the closest date to today (before or after).

    =IFERROR(1/(1/LOOKUP(0,0/FREQUENCY(0,ABS(A3:C3-TODAY())),A3:C3)),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Contributor
    Join Date
    02-05-2021
    Location
    Netherlands
    MS-Off Ver
    Microsoft Excel 365 (version 2022, Build 14931.20764)
    Posts
    182

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    Great, thank you very much. That worked for me :-)
    Have a nice weekend!

  8. #8
    Forum Contributor
    Join Date
    02-05-2021
    Location
    Netherlands
    MS-Off Ver
    Microsoft Excel 365 (version 2022, Build 14931.20764)
    Posts
    182

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    Hi Glenn,

    In fact, I can use both (for other purposes). Thank you very much!

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,427

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    OK... I assumed it was either side, because in your sample 24/6/22 is in the past...

  10. #10
    Forum Contributor
    Join Date
    02-05-2021
    Location
    Netherlands
    MS-Off Ver
    Microsoft Excel 365 (version 2022, Build 14931.20764)
    Posts
    182

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    Quote Originally Posted by Glenn Kennedy View Post
    OK... I assumed it was either side, because in your sample 24/6/22 is in the past...
    In fact that could be the case. People are behind work then

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,649

    Re: Show the date in the three columns (even when two or three columns have no date entry)

    Glenn is right, though: your requirements and the function you were using (MIN) did not actually match.

+ 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: 5
    Last Post: 01-17-2020, 06:21 AM
  2. Show duplicate rows based on date from multiple columns
    By jsnodin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2018, 06:43 AM
  3. Show specific columns based on date of Windows
    By salmasaied in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-30-2017, 09:16 AM
  4. [SOLVED] 2 Columns - Find Data to Last Item Entry & Date to Left of Cell
    By mycon73 in forum Excel General
    Replies: 7
    Last Post: 08-17-2014, 08:00 PM
  5. [SOLVED] Show All Data From Two Columns Matching Todays Date In A Msgbox
    By BigDawg15 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2013, 01:17 PM
  6. Show entire row from Master Sheet if any of the columns are within a date range
    By chriswathen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2012, 05:44 PM
  7. Force Date Entry with Variable Rows, Fixed Columns
    By rlw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2007, 08:36 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