Forum Discussion
None None
Feb 08, 2018Copper Contributor
Returning a text value from an array
I have an array. and want to search a specific column for a value greater than 0 in the array. if i find a value greater than 0 i want to return the text entered in a different column of the array....
None None
Feb 09, 2018Copper Contributor
I have attached an excel file that may explain better
SergeiBaklan
Feb 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.