[英]Vlookup and match
I'm trying to cross data to fill a sheet but I'm having some doubts. 我正在尝试交叉数据以填充工作表,但我有一些疑问。
I have a number a value in a sheet, and I want to complete it with data from another sheet. 我在工作表中有一个数值,我想用另一个工作表中的数据来完成它。
For example: 例如:
I want to complete Column C in sheet 1, with the age that appears in sheet 2 (no problem if it copy's the whole cell), but it's not in a specific column. 我想用工作表2中显示的年龄来完成工作表1中的C列(如果复制的是整个单元格,则没有问题),但是它不在特定的列中。 I tried to use vlookup & match, and it's returning an error.
我尝试使用vlookup&match,并且返回错误。 a Vlookup the EAN column, and use match the specific string "Age:".
Vlookup的EAN列,并使用匹配特定的字符串“ Age:”。
Can you help me? 你能帮助我吗? Am I using the right formula
我使用正确的公式吗
Edit: 编辑:
Found this source where it explains how to do It. 在此来源中找到了解释方法。 In your case it would be:
您的情况是:
{=INDEX(Sheet 2!E2:CT2,MATCH(FALSE,ISBLANK(Sheet 2!E2:CT2),0))}
This is if your data starts on Row 2 and as you said the age columns are between E:CT 这是如果您的数据从第2行开始,并且您所说的年龄列在E:CT之间
Note how to insert the array formula as is explained on the post of the source. 请注意如何按照源代码中的说明插入数组公式。
Step 1, find the row you want to work on: (Match on values in Column A) 步骤1,找到您要处理的行:(匹配A列中的值)
=MATCH(Sheet1!$A2, Sheet2!$A:$A, 0)
Step 2, grab that entire row via OFFSET
or INDEX
: 步骤2,通过
OFFSET
或INDEX
获取整个行:
=OFFSET(Sheet2!$1:$1, MATCH(Sheet1!$A2, Sheet2!$A:$A, 0) - 1, 0)
Step 3, find the Age cell in that Row using HLOOKUP
and Wildcards ( "*"
): 步骤3,使用
HLOOKUP
和通配符( "*"
)在该行中找到Age单元:
=HLOOKUP("Age:*", OFFSET(Sheet2!$1:$1, MATCH(Sheet1!$A2, Sheet2!$A:$A, 0) - 1, 0), 1, FALSE)
(Optional) Step 4, convert to number: (可选)步骤4,转换为数字:
=0 + TRIM(SUBSTITUTE(HLOOKUP("Age:*", OFFSET(Sheet2!$1:$1, MATCH(Sheet1!$A2, Sheet2!$A:$A, 0) - 1, 0), 1, FALSE), "Age:", ""))
Then just drag that down from C2 to however many rows you need. 然后,只需将其从C2拖动到所需的任何行即可。 This will find the cell that starts with "Age:" in any column,
A:XFD
这将在任何列
A:XFD
找到以“ Age:”开头的单元格
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.