Hi there, I am trying to use an IF statement that selects a text value based on what is selected within an Autofilter.
As an example, if 'Selection 1' is filtered in column A, I would like to return the heading from Row 4 where the value of 1 is in either B, C, D or E,
So if 'Selection 1' is filtered, B1 would = "Test1" and, if 'Selection 2' is filtered, I would like "Test2" to be shown in B1 etc
My data is
I have tried using the formula below in B1: -
=IF(SUBTOTAL(3,B5)=1,B4,IF(SUBTOTAL(3,C5)=1,C4,IF(SUBTOTAL(3,D5)=1,D4,IF(SUBTOTAL(3,E5)=1,E4,"N/A"))))
The above works for column B, and incorrectly returns N/A for where columns C,D and E = 1. I have also tried (and dramatically failed) to use a helper column with an Index(Match, but I think this can only return results from the same row and not column.
Can any of you wonderful people out there help?
As an example, if 'Selection 1' is filtered in column A, I would like to return the heading from Row 4 where the value of 1 is in either B, C, D or E,
So if 'Selection 1' is filtered, B1 would = "Test1" and, if 'Selection 2' is filtered, I would like "Test2" to be shown in B1 etc
My data is
I have tried using the formula below in B1: -
=IF(SUBTOTAL(3,B5)=1,B4,IF(SUBTOTAL(3,C5)=1,C4,IF(SUBTOTAL(3,D5)=1,D4,IF(SUBTOTAL(3,E5)=1,E4,"N/A"))))
The above works for column B, and incorrectly returns N/A for where columns C,D and E = 1. I have also tried (and dramatically failed) to use a helper column with an Index(Match, but I think this can only return results from the same row and not column.
Can any of you wonderful people out there help?