[英]Vlookup / Match max min number on different worksheet
I have 2 worksheets, one with company data and the other with a min max and answer column. 我有2个工作表,一个工作表包含公司数据,另一个工作表包含min max和answer列。
What i need to do is find out if value in column D in the company data is between the min/max in worksheet 2 output answer in worksheet 2. 我需要做的是找出公司数据中D列中的值是否介于工作表2中答案的最小值/最大值之间。
Please can someone help. 请有人帮忙。 This is clearly a vlookup question but i haven't got a clue how to do the min/max. 显然这是一个vlookup问题,但我不知道如何进行最小/最大操作。
Any help will be greatly appreciated. 任何帮助将不胜感激。
worksheet 1 工作表1
NAME TYPE NUMBEROFEMPLOYEES Output
Wetland Plants Ltd Client 4
Capital Management LLP Clients 3
College ltd Clients 156
Worksheet 2 工作表2
max min output
100000000 60000 big
59999 15000 medium
14999 0 small
Cheers guys 欢呼的家伙
As TheGreatCO says, you need to re-arrange the table to make VLOOKUP (or LOOKUP) work but if you want the tables to remain as they are then try this formula in sheet1 E2 正如TheGreatCO所说,您需要重新安排表格以使VLOOKUP(或LOOKUP)正常工作,但是如果您希望表格保持原样,请尝试在sheet1 E2中使用此公式
=INDEX(Sheet2!C$2:C$4,MATCH(D2,Sheet2!A$2:A$4,-1))
Assumes that D2 contains the number of employees and that your sheet2 table is in A2:C4 (Max in A2:A4, Min in B2:B4 and output in C2:C4) 假设D2包含雇员人数,并且您的sheet2表位于A2:C4中(A2:A4中的最大值,B2:B4中的最小值,而C2:C4中的输出)
You can copy the formula down the column.... 您可以将公式复制到该列下。...
You can do a VLOOKUP only if the key data column (column with data you are looking up by) is in ascending alphanumeric order, eg. 仅当关键数据列(正在查找的数据列)按字母数字顺序升序时,才可以执行VLOOKUP。 from 0 to 9, a to z. 从0到9,从a到z。 In this case, your worksheet 2 should be (from top to bottom) 14999 -> 0, 59999 -> 15000, 100000000 -> 60000. 在这种情况下,您的工作表2应该是(从上到下)14999-> 0,59999-> 15000,100000000-> 60000。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.