Forum Discussion
Returning a text value from an array
Hi,
It could be like
=IFNA(INDEX(<category column>, MATCH(<number>,<label column>,0)),"")
Thank you
That did not work for what I wanted it to do
- Willy LauFeb 08, 2018Iron Contributor
There is a similar case that based on a selected row header (yours is column header) to get the list of data in a row (yours is column), and then return the column headers of the data (yours is to return row header).
- SergeiBaklanFeb 08, 2018Diamond Contributor
If you attach your sample as Excel file we could give you concrete formula for that
- None NoneFeb 09, 2018Copper Contributor
I have attached an excel file that may explain better
- SergeiBaklanFeb 09, 2018Diamond Contributor
Hi,
When the approach approximately as Willy suggested. The formula in A43 will be
=IFERROR( INDEX(A$3:A$34, SMALL( IF( OFFSET($B$2,1,MATCH($B$42,$B$2:$M$2,0)-1, MATCH("Total",$A$1:$A$35,0)-MATCH("Category",$A$1:$A$35,0)-1) >0, ROW(A$3:A$34)-ROW(A$2) ), ROWS(A$3:A3) ) ), "")(that is an array formula entered by Ctrl+Shift+Enter), an copy it down.
Within OFFSET first MATCH defines which column to take based on month name and the second MATCH calculates number of rows within the list (between Category and Total).
How the formula works is here http://www.exceltactics.com/make-filtered-list-sub-arrays-excel-using-small/4/, first what I found, but there are quite a lot similar posts.
Please see attached.