google sheets - How do I apply ARRAY Formula for XLOOKUP? - Stack Overflow

I have an XLOOKUP function that is working the way I want. (I've wrapped it with some validation f

I have an XLOOKUP function that is working the way I want. (I've wrapped it with some validation functions)

=IF($A$2:$A<>"",IFNA(XLOOKUP($A2 & B$1, ARRAYFORMULA('Unit Update'!$B$2:$B & 'Unit Update'!$D$2:$D), 'Unit Update'!$A$2:$A), ""),"")

I want to apply an ARRAY FORMULA so that I do not have to drag the fill handle down every time I want to update this, because this formula is intended to see on-going use for a regularly expanding list. My current, very limited understanding is that I just need to wrap the whole thing in ARRAYFORMULA() like below

=ARRAYFORMULA(IF($A$2:$A<>"",IFNA(XLOOKUP($A2 & B$1, ARRAYFORMULA('Unit Update'!$B$2:$B & 'Unit Update'!$D$2:$D), 'Unit Update'!$A$2:$A), ""),""))

But when I do so it only repeats the first value rather than applying the formula how I want it to be applied. Here is an image of the first XLOOKUP function, without ARRAYFORMULA, when I just drag out the fill handle: XLOOKUP NO ARRAYFORMULA

And here is an image of the second XLOOKUP within ARRAYFORMULA: XLOOKUP WITH ARRAY FORMULA

I have no clue as to why. I'm hoping it's just something very small that I missed. Is there a better way to accomplish what I am trying to do?

I have an XLOOKUP function that is working the way I want. (I've wrapped it with some validation functions)

=IF($A$2:$A<>"",IFNA(XLOOKUP($A2 & B$1, ARRAYFORMULA('Unit Update'!$B$2:$B & 'Unit Update'!$D$2:$D), 'Unit Update'!$A$2:$A), ""),"")

I want to apply an ARRAY FORMULA so that I do not have to drag the fill handle down every time I want to update this, because this formula is intended to see on-going use for a regularly expanding list. My current, very limited understanding is that I just need to wrap the whole thing in ARRAYFORMULA() like below

=ARRAYFORMULA(IF($A$2:$A<>"",IFNA(XLOOKUP($A2 & B$1, ARRAYFORMULA('Unit Update'!$B$2:$B & 'Unit Update'!$D$2:$D), 'Unit Update'!$A$2:$A), ""),""))

But when I do so it only repeats the first value rather than applying the formula how I want it to be applied. Here is an image of the first XLOOKUP function, without ARRAYFORMULA, when I just drag out the fill handle: XLOOKUP NO ARRAYFORMULA

And here is an image of the second XLOOKUP within ARRAYFORMULA: XLOOKUP WITH ARRAY FORMULA

I have no clue as to why. I'm hoping it's just something very small that I missed. Is there a better way to accomplish what I am trying to do?

Share Improve this question edited 12 hours ago BigBen 50.2k7 gold badges28 silver badges44 bronze badges asked 12 hours ago seanbanseanban 1 New contributor seanban is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • Please do not upload images of code/data/errors. Instead, provide a minimal, reproducible example using Tables or tools like Table to Markdown that can easily be copied and pasted. If necessary, as a last resort, Make an anonymous sample document. – Saddles Commented 12 hours ago
Add a comment  | 

1 Answer 1

Reset to default 1

Change this specific part of the formula

XLOOKUP($A2 & B$1,

to

XLOOKUP($A2:A & B$1,

so that entire range of A2:A is considered

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743752481a4501157.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信