1

I have multiple columns of dates in a Google Sheets spreadsheet (created using arrayformula) Some values have dates, some are blank.

For each row I want to find the ealiest date, but Min() function does not work inside ArrayFormula(). How to do this?enter image description here

1
  • share a copy of your sheet with example of desired output Commented Oct 13, 2021 at 8:25

1 Answer 1

1

Try

=query(transpose(query(
{transpose(D2:J)},
"select "&"min(Col"&arrayformula(textjoin("),min(Col",true,sequence(1,rows(D2:J),1,1)))&") ",
0)),"select Col2",0)

the core of the formula is to transpose values so that they are in columns, and then calculate the min(Col1), min(Col2), ... until min(ColX)

Explanation

1- transpose your array

{transpose(D2:J)}

2- apply query

3- select min(ColX) the suite min(ColX) is obtained by

min(Col"&arrayformula(textjoin("),min(Col",true,sequence(1,rows(D2:J),1,1)))

4- finally, transpose the result and select only Col2 to erase the labels

Sign up to request clarification or add additional context in comments.

2 Comments

Thank You! I am having trouble understanding it, but it worked when I plugged it in, so thank you!
I updated my answer with some explanation, especially the third ... try it alone to see the result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.