Forum Discussion
Coupland1925
Jan 27, 2021Copper Contributor
IF Statement
Hello, I have a question about a monster IF statement. My question is - where I've now managed to condense the IF statement by looking at ranges... how do I ask excel to only return the first resul...
mtarler
Jan 27, 2021Silver Contributor
Coupland1925 I think a LOOKUP approach would be easier:
=XLOOKUP(0,Q3:CD3,Q1:CD1,"",1,1)
EDIT: I assumed this based on your FIRST equation that used >0
and to answer your actual question you could use INDEX to return the first item:
=INDEX(IF(Q3:CD3<>"",Q1:CD1,""),1)
edit 2: it just occurred to me that your IF statement there will return "" and hence if the first item is "" it will return "" (i.e. I don't think that will do what you want)
maybe use this:
=INDEX(FILTER(Q1:CD1,Q3:CD3<>""),1)
- Coupland1925Jan 27, 2021Copper Contributor
mtarler Thank you so much - the level of skill here is amazing - first time I have used this board and I'm blown away.
Edit 2 does exactly what I need! Thank you so much!!