简体   繁体   English

索引具有多个条件的数据子集的最小值

[英]Index a Minimum of a Subset of Data With Multiple Criteria

I'm wondering if it is possible in Excel to index a subset of my data to find the minimum of that subset. 我想知道在Excel中是否有可能对我的数据子集建立索引以查找该子集的最小值。 Ideally, I would like to do this within one formula instead of having to create multiple helper areas. 理想情况下,我想在一个公式中执行此操作,而不必创建多个帮助程序区域。 The closest I have come is the following formula... 我最接近的是以下公式...

{=INDEX(INDEX(Employees!$A$3:$A$47,MATCH(1,(B12=Employees!$B$3:$B$47)*('NEW Project'!C4<Employees!$C$3:$C$47),0)),MATCH(MIN(Employees!$J$11:$J$19),Employees!$J$11:$J$19,0))}

...but this formula only performs the first index and doesn't allow me to Index(Index)) all potential answers to search them to find the minimum value. ...但是此公式仅执行第一个索引,不允许我对所有可能的答案进行索引(索引)来搜索它们以找到最小值。

My data referred to is as follows: 我引用的数据如下:

Worksheet: Employees
A           B           C                     ...          J  
Employee | Title | Max $ Amount for Project | ... | Hours on Projects
Bert     | PM    | $35,000,000              | ... | 148
Shauna   | PM    | $15,000,000              | ... | 32
Dan      | QA    | $5,000,000               | ... | 360

What I'm trying to do is find a subset of my employees that are a specific position title that I enter into a cell (L2) and have a high enough Max $ Amount for Project based on a hypothetical future project value that I enter into another cell (M2) and return the one who currently has the most free time (min Hours on Projects). 我想要做的是找到我的一个员工子集,这些子集是我输入到单元格(L2)中的特定职位名称,并且根据我输入的假设的未来项目价值具有足够高的“项目最高金额”另一个单元格(M2),并返回当前空闲时间最多的单元(“项目最小时数”)。

eg, $27,000,000 Project (M2), looking for a Project Manager (L2) 例如,$ 27,000,000项目(M2),寻找项目经理(L2)

I want to index my list of employees to find PMs (2 of them) and grab the one of them who has the current lowest value of hours already dedicated to projects and also has the clearance to work on a project of that size. 我想索引我的雇员列表以查找PM(其中2个),并抓住其中一个拥有目前最低的小时价值的人,他们已经致力于项目,并且还具有处理该规模项目的许可。 The formula would return "Bert" because he is the only one who can work on projects of that value at that position. 该公式将返回“ Bert”,因为他是唯一可以在该职位上从事具有该价值的项目的人。 However, if I had a new project value of $12,000,000 and was looking for a PM, the formula would return "Shauna" because she has fewer Hours on Projects currently, and can fit this new project into her less busy schedule than Bert's. 但是,如果我的新项目价值为1200万美元,并且正在寻找项目经理,则该公式将返回“ Shauna”,因为她目前在项目上的工时更少,并且可以将该新项目放入比Bert更少的繁忙计划中。

Thank you for any and all help and let me know if you need any more clarification! 感谢您提供的所有帮助,如果您需要其他说明,请告诉我!

Use this formula: 使用以下公式:

=INDEX(A:A,MATCH(MIN(IF(B:B="PM",IF(C:C>=5000000,J:J))),J:J,0))

It is an array formula and must be applied with Ctrl-Shift-Enter. 它是一个数组公式,必须与Ctrl-Shift-Enter一起应用。

It was not understood from where the data was to be used to insert the criteria. 从何处不知道要使用数据来插入标准。 If L2 held the title that was wanted and M2 the minimum value the Formula would be 如果L2保留了想要的标题,而M2保留了最小值,则公式为

=INDEX(A:A,MATCH(MIN(IF(B:B=L2,IF(C:C>=M2,J:J))),J:J,0))

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

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