Excel Formula issue

Copper Contributor

Hello,

 

So i am having an issue with a formula.

 

=IF( A24 = STATS!B1:B32, STATS!AK1:AK32, "") produces an error everytime, Basically what I am trying to do is say if anything of column B is the same. I want it to pull information from that same row and put it on a different page of the workbook. However, this does work. =IF(A24 = "VGK", STATS!AK1:AK32, ""). SO it has to be something i am doing with column B on the STATS worksheet. I think it is trying to add all of the columns up to equal that one cell, but obviously that creates an error, How do I fix this thanks? 

3 Replies

@hoopghetto 

It's always helpful if you upload a sample file with not working formula and desired output mocked up manually to visualize what exactly you are trying to achieve.

 

Btw, please try this and see if this is what you are trying to achieve.

 

=IFERROR(INDEX(STATS!$AK$1:$AK$32,MATCH(A24,STATS!$B$1:$B$32,0)),"")

@hoopghetto 

Another alternative would be: 

=IFNA(LOOKUP(2,1/(

STATS!B$1:B$32=A24),

STATS!AK$1:AK$32),

"")

The reason for the error is IF does not treat B1:B32 as an array. Excel isn't checking all those cells to see if A24 is present. As the others have advised, you'll need a lookup function.

If you're running a fully updated version of O365 you may get a spilled result with your original formula. Excel is getting smarter!