将多张纸合并成1张 [英] Combine multiple sheets to 1 sheet

查看:146
本文介绍了将多张纸合并成1张的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在考虑在第一列中有唯一的值,然后是VLOOKUP对于其余的。但是我很难想出如何返回到第二张表格中的第一个单元格。



解决方案

使用您的样本数据图像(数字在列A中保留数字很重要),这两个标准公式将注定为Sheet3! A2:B2。

  = IFERROR(INDEX(Sheet1!A $ 2:INDEX(Sheet1!A:A,MATCH(1E + 99,Sheet1!A:A)),ROW(1:1)),IFERROR(INDEX(Sheet2!A $ 2:INDEX(Sheet2!A:A,MATCH(1E + 99,Sheet2!A:A)),ROW (1:1)-COUNT(Sheet1!A:A)),))
= IFERROR(VLOOKUP($ A2,Sheet1!$ A:B,COLUMN(B:B),FALSE),IFERROR (VLOOKUP($ A2,Sheet2!$ A:B,COLUMN(B:B),FALSE),))

将B2填充到C2,然后填写A2:C2到足够远的位置来捕获所有可用的条目。



您可能需要考虑使用条件格式规则一个当没有足够的公式来覆盖Sheet1和Sheet2中的条目时,这是一个警告。像 = COUNT(Sheet1!$ A:$ A)+ COUNT(Sheet2!$ A:$ A)<> COUNT(Sheet3!$ A:$ A)将标题变为红色。



有一个公式来检索相应的源工作表名称到将2个Excel表合并成一个附加数据


Is there any way to combine 2 or more sheets to 1 sheet without using VBA?

I was thinking of having a unique value in the first column, then VLOOKUP for the rest. but i'm having a hard time figuring out how to return to the first cell in the 2nd sheet.

解决方案

Using your sample data image (it's important that numbers remain numbers in column A), these two standard formulas are destined for Sheet3!A2:B2.

=IFERROR(INDEX(Sheet1!A$2:INDEX(Sheet1!A:A, MATCH(1E+99, Sheet1!A:A)), ROW(1:1)), IFERROR(INDEX(Sheet2!A$2:INDEX(Sheet2!A:A, MATCH(1E+99, Sheet2!A:A)), ROW(1:1)-COUNT(Sheet1!A:A)), ""))
=IFERROR(VLOOKUP($A2, Sheet1!$A:B, COLUMN(B:B), FALSE), IFERROR(VLOOKUP($A2, Sheet2!$A:B, COLUMN(B:B), FALSE), ""))

Fill B2 right to C2 then fill A2:C2 down far enough to catch all available entries.

You may want to consider a conditional formatting rule used as a warning when there are not enough formulas to cover the entries from Sheet1 and Sheet2. Something like =COUNT(Sheet1!$A:$A)+COUNT(Sheet2!$A:$A)<>COUNT(Sheet3!$A:$A) to turn the header red.

There is a formula for retrieving the appropriate source worksheet name to an additional column in Combine 2 Excel tables into one appending the data.

这篇关于将多张纸合并成1张的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆