[英]Using Vlookup inside array formula in Sheets
I have two sheets with relevant columns: 我有两张带有相关列的工作表:
I'm hoping to populate "Credits" inside of "Confirmed Cards" with "Rolling Total Credits" from "Purchase Credits" by cross-referencing emails to show how many credits a user has. 我希望通过交叉引用电子邮件以显示用户拥有多少信用来在“确认卡”中的“信用”中填充“购买信用”中的“滚动总信用”。
I'm hoping to do this within an Array Formula, so as users are added to my database within confirmed cards, the amount of credits they own are automatically updated. 我希望在数组公式中执行此操作,以便在将用户添加到我已确认的卡中的数据库时,他们拥有的信用额度会自动更新。
This is what I am currently using within "Confirmed Cards" to try to pull in the amount of credits the user has: 这是我目前在“确认卡”中使用的尝试获取用户信用额度的方法:
=ArrayFormula(VLOOKUP(A2:A,'Purchase Credits'!A2:F,5))
The formula correctly inputs the correct amount of credits for A2, the first user email, however, it inputs this value into every single row, regardless of email. 该公式为第一个用户电子邮件A2正确输入了正确的信用额度,但是,无论电子邮件如何,它都会将此值输入到每一行中。 For example, if
alex@gmail.com
has 100 credits, this amount shows for every single row within "Credits." 例如,如果
alex@gmail.com
有100个信用,则此金额显示在“信用”中的每一行中。
you will need 4th vlookup parameter. 您将需要第四个vlookup参数。 try:
尝试:
=ARRAYFORMULA(IFERROR(VLOOKUP(A2:A, 'Purchase Credits'!A2:F, 5, 0)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.