简体   繁体   English

在这种情况下如何使用VLOOKUP?

[英]How to use VLOOKUP in this situation?

Here's what I'm trying to do with no success. 这就是我试图做的没有成功的事情。 I have 2 sheets in a workbook. 我的工作簿中有2张纸。 Format and TC. 格式和TC。 Format looks something like this: 格式看起来像这样: 在此处输入图片说明

And TC looks something like this TC看起来像这样 在此处输入图片说明

I want to add after the last column in Format another column where to add the values that are in the 10th column of the TC value. 我想在格式化另一列的最后一列之后添加,以在其中添加TC值的第10列中的值。 That if the 2nd columns in both are the same. 如果两者的第二列相同。 This is how I tried to do it and it seems it doesn't work and I really don't know why since I'm an absolute beginer with VLOOKUP. 这是我尝试执行的操作,但似乎不起作用,而且我真的不知道为什么,因为我绝对是VLOOKUP的初学者。

=IF(VLOOKUP(B2;TC!B:B;TC!V:V;FALSE)= "Montaj (Montage)"; "here I want to select the time and I don't know how…"; "VALUE NOT FOUND")

To explain it better... if the value of one cell in column 2(B) in the Format sheet is found in TC sheet in column 2(or B) then if the value of the 4th column (V) is "Montaj (Montage)" I want to put the value in the 10th column (235 in the example). 为了更好地说明...如果在格式表2(B)的TC表的第2(B)列中找到一个单元格的值,那么如果第4列(V)的值是“ Montaj(蒙太奇)”,我想将该值放在第10列(示例中为235)。 Thanks a lot for your help! 非常感谢你的帮助!

FINAL UPDATE: Added explanation. 最后更新:添加了解释。

What you need is SUMIFS. 您需要的是SUMIFS。 I fixed this to match your comment below. 我已解决此问题,以匹配您在下面的评论。

=SUMIFS(TC!Z:Z,TC!B:B,Format!B2,TC!J:J,"Montaj (Montage)")

This will look in the B column in the TC sheet and look for the value in B2 of the Format sheet. 这将在TC表的B列中查找,并在Format表的B2中查找值。 If it finds it, AND it finds "Montaj (Montage)" in the same row in the J column, then it will return(sum if there are more than one match) value in the SAME ROW in the J column. 如果找到它,并且在J列的同一行中找到“ Montaj(Montage)”,则它将在J列的SAME ROW中返回(如果有多个匹配项,则为总和)。

SUMIF is really convenient for summing conditions like this. SUMIF对于像这样的条件求和真的很方便。 If you only have 1 condition, you can use SUMIF. 如果您只有1个条件,则可以使用SUMIF。 VLookup is similar, but it just returns a single value, it doesn't do anything with it. VLookup与之类似,但是它仅返回一个值,它不执行任何操作。

Here is some helpful info on how SUMIFS works: http://office.microsoft.com/en-us/excel-help/sumifs-function-HA010047504.aspx 以下是一些有关SUMIFS工作原理的有用信息: http : //office.microsoft.com/zh-cn/excel-help/sumifs-function-HA010047504.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM