- last edited on
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. See below for a picture.
i want to search column labeled 1 and any cell with a value greater then 0 will then return the text from the cell next to in from the column titled "category"
for example i search Column labeled 1 and find cell with "3" in it. cell with Adhesive Issues will be copied and returned to another cell. Also column with a 1 will return "did not cool" etc.
|Category||Number of reports||Jan||Feb||Mar||Apr||May||Jun||Jul||Aug|
|Broken Roller Ball||0||0||0||0||0||0||0||0|
|Burning Effect-Not a Claim (BeKoool & OTC Only)||0||0||0||0||0||0||0||0|
|Did Not Cool||1||1||0||0||0||0||0||0|
|Difficult to Open||0||0||0||0||0||0||0||0|
|Ineffective (Medical Device & OTC Only)||0||0||0||0||0||0||0||0|
02-08-2018 09:01 AM
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).
02-09-2018 04:54 AM
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.