Google sheets next date due
Author
Discussion

HOGEPH

Original Poster:

5,249 posts

218 months

Friday 22nd December 2017
quotequote all
Anyone able to offer a solution?

I have a spreadsheet with dates for checks due.

I have worked out how to show the next check due by using MIN for the range selected, but this will show the earliest date, which may be out of date.

How do I show the next upcoming date due after today's date?

Thanks in advance.

Ultuous

2,293 posts

223 months

Friday 22nd December 2017
quotequote all
Someone may find a tidier solution (I'm more familiar with Excel and the concatenate bit feels a little clunky) but this seems to work:

=MINIFS(A:A,A:A,CONCATENATE(">=",today()))

Where A:A is your range of dates (i.e. change both instances to suit your specific range)

peter tdci

2,047 posts

182 months

Friday 22nd December 2017
quotequote all
How many dates have you got? It might affect your approach. There are a couple of easy things that might help.

Filter the data on dates greater than today - if the data is also sorted in date order, the next check due would be at the top.

If you haven't got lots of records, conditionally format the dates greater than today so that they show with a different colour, for instance.

HOGEPH

Original Poster:

5,249 posts

218 months

Friday 22nd December 2017
quotequote all
Thank you for the advice. I have a row showing date the check was carried out, followed by its expiry date, then the next check, date carried out, expiry etc etc.

I have conditional formatting (shows cell in red) to show expired dates, but because the row is so long, I want to show the next upcoming check due, in a separate column for quick reference.

The min function works OK for this, but shows check due with dates before today, I'm trying to show what is coming up next.

peter tdci

2,047 posts

182 months

Friday 22nd December 2017
quotequote all
I didn't know if Google sheets did array formulae, but they do!

Have a play with this formula - it finds the smallest date that's bigger than the current time in the range H3:H39.

=ArrayFormula(MIN(IF(H3:H39>=NOW(),H3:H39)))

edit: I've re-read your last comment - can the next check due date be in different columns?

Edited by peter tdci on Friday 22 December 11:55

Alex

9,978 posts

316 months

Friday 22nd December 2017
quotequote all
Try

=MINIFS(A1:A30,A1:A30,">="&TODAY())

HOGEPH

Original Poster:

5,249 posts

218 months

Friday 22nd December 2017
quotequote all

Arrayformula worked best for what I need!

Sorted!

Thanks to all and Merry Christmas!

Edited by HOGEPH on Friday 22 December 12:24

Ultuous

2,293 posts

223 months

Friday 22nd December 2017
quotequote all
Alex said:
Try

=MINIFS(A1:A30,A1:A30,">="&TODAY())
Which is the tidier version of 'mine' that I was suggesting may be possible (and not sure how I missed it, as '&' is exactly what I would have done in Excel!) thumbup

ZesPak

26,182 posts

228 months

Friday 22nd December 2017
quotequote all
I would have added an extra column that checks if the date > today, and displays it if it is.
Then just take the MIN of that column.