如何使用excel公式得到这样的结果
我有两个 Excel 工作表
下面是两个工作表的示例
sheet1
a 1
b 2
d 1
e 3
g 1
sheet2
a
b
c
d
e
f
我想在工作表 2 的 b1 中放入一个公式并将其向下拖动,以便生成的工作表 2 是
sheet2
a 1
b 2
c 0
d 1
e 3
f 0
explanation : - a = 1 because same value in book1
b = 2 because same value in book1
c = 0 because c does not exist in book1
d = 1 because same value in book1
e = 3 because same value in book1
f = 0 because f does not exist in book1
我可以在工作表 2 的 b 列中使用什么公式?
i have two excel sheets
An example of the two sheets are below
sheet1
a 1
b 2
d 1
e 3
g 1
sheet2
a
b
c
d
e
f
i want to put a formula in b1 of sheet 2 and drag it down so that the resulting sheet 2 is
sheet2
a 1
b 2
c 0
d 1
e 3
f 0
explanation : - a = 1 because same value in book1
b = 2 because same value in book1
c = 0 because c does not exist in book1
d = 1 because same value in book1
e = 3 because same value in book1
f = 0 because f does not exist in book1
what formula can i use in b column of sheet 2 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
if()、iserror() 和 vlookup() 的组合将是您的最佳选择。
假设sheet1中的数据位于名为“refdata”的范围内,
应该执行您需要的操作(其中A1是包含您要匹配的数据的单元格)
A combination of if(), iserror() and vlookup() will be your best bet here.
Assuming your data from sheet1 is in a range called 'refdata',
should do what you need (Where A1 is the cell containing the data you want to match on)
在 Excel 2007 中,它看起来像这样:
In Excel 2007 it looks like this: