Excel:找到范围内的最小值 [英] Excel: find the minimum value in range

查看:343
本文介绍了Excel:找到范围内的最小值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个电子表格,其中列出了完成任务和发生日期的时间列表。对于每一行,我想找到时间差与该日期的最小值。



我尝试了一个min / vlookup函数,但这只是给我时间该日期的最后一个条目,而不是日期的最短时间。



以下是一些示例数据:



3/24/2013 38.324



3/24/2013 38.96



3/24/2013 40.354



4/13/2013 50.508



4/13/2013 50.695



4/13/2013 50.722



编辑:
我希望数据如下所示:

DATE<> SECONDS<> DIFF

3/24/2013<> 38.324<> 0

3/24/2013<> 38.96< ;> 0.636

3/24/2013<> 40.354<> 2.03

4/13/2013<> 50.508<> 0

4/13/2013<> 50.695<> 0.187

4/13/2013<> 50.722< 0.214< / p>

编辑2:
此外,每个日期可能没有相同数量的条目。所以我更愿意只是拖动公式,然后

1.找出当前行的日期

2.找到范围的最小值的条目

3.计算该行的时间记录与该日期的最短时间之间的差异。

解决方案

考虑到您的数据位于 A1:B6



输入 C1
= MIN(IF($ A $ 1:$ A $ 6 = A1,$ B $ 1:$ B $ 6))
这将给你最小的按日期分组。这是一个数组公式,所以使用 CTRL + SHIFT + ENTER 输入公式。



然后输入 D1 = C1-B1 与日期的最小值不同。



然后向下拖动 C1 D1 单元格以复制公式。



或者您可以将两个公式合并到一个单元格中 C1 = MIN(IF($ A $ 1:$ A $ 6 = A1,$ B $ 1:$ B $ 6)) - B1 ,再次使用 CTRL + SHIFT + ENTER 输入公式。


I have a spreadsheet with a list of times to complete a task and the date it occurred. For each row, I would like to find the time difference vs the minimum value for that date.

I tried a min/vlookup function, but that just gives me the time of the last entry for that date, not the minimum time for the date.

Here is some sample data:

3/24/2013 38.324

3/24/2013 38.96

3/24/2013 40.354

4/13/2013 50.508

4/13/2013 50.695

4/13/2013 50.722

EDIT: I would like the data to look like this:
DATE <> SECONDS <> DIFF
3/24/2013 <> 38.324 <> 0
3/24/2013 <> 38.96 <> 0.636
3/24/2013 <> 40.354 <> 2.03
4/13/2013 <> 50.508 <> 0
4/13/2013 <> 50.695 <> 0.187
4/13/2013 <> 50.722 <> 0.214

EDIT 2: Also, there may not be the same number of entries for each date. So I would prefer to be able to just drag the formula down and then
1. have it figure out the date of the current row
2. find the minimum value of the range of entries for that date
3. calculate the difference between the time record on that row and the minimum time of that date.

解决方案

Considering your data is on A1:B6

Enter to C1: =MIN(IF($A$1:$A$6=A1,$B$1:$B$6)) This will give you minimum grouped by date. This is an array formula so use CTRL+SHIFT+ENTER to enter the formula.

And enter to D1: =C1-B1 Difference from minimum for the date.

Then drag down C1 and D1 cells to copy down the formulas.

Or you can put both formulas together into one cell C1: =MIN(IF($A$1:$A$6=A1,$B$1:$B$6))-B1, Again use CTRL+SHIFT+ENTER to enter the formula.

这篇关于Excel:找到范围内的最小值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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