I need to display the last X number of cells containing data from the columns on my Data sheet in a row on my Horizontal sheet. In
and:
=OFFSET(A1,,COUNTA(1:1)-10,,10)
CodePudding user response:
You can transpose the data within the query in order to get a vertical list of the last 10 values, like this:
=QUERY(TRANSPOSE(Data!B1:1),"limit 10 offset "&(COUNT(Data!B1:1)-10))
If you need it horizontally, transpose the whole formula again to retain the horizontal orientation.
=TRANSPOSE(QUERY(TRANSPOSE(Data!B1:1),"limit 10 offset "&(COUNT(Data!B1:1)-10)))