给定列A中的值,在EXCEL中的列B中找到最小/最大值 [英] Given value in column A, find min/max in column B in EXCEL

查看:203
本文介绍了给定列A中的值,在EXCEL中的列B中找到最小/最大值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一列公共汽车站号(A列)和列B是各种时间,每个值是一个人登上/下车的时间。为了知道公共汽车停在多长时间,我想找出B列的最大/最小值之间的区别,给定一定值A。

  84009 9:17:38 AM 
84009 9:17:40 AM
84009 9:17:41 AM
84009 9:17:43 AM
84009 9:17:50 AM
84009 9:17:55 AM
84029 9:22:47 AM
84029 9:22:47 AM
84029 9:22:49 AM
84029 9:22:50 AM
84019 9:23:49 AM
83049 9:28:19 AM
82069 9:32:32 AM
82069 9:32:49 AM
82049 9:33:58 AM
82049 9:33:58 AM
82049 9:33:59 AM
82049 9:34:02 AM
82049 9:34:10 AM
82029 9:35:13 AM

所以前7行应该打印00:00:17,接下来的4是00:00:04等,因为它们是相同的A值。这可能吗?感觉像它接近但不完全相同。太感谢了。
任何帮助将不胜感激

解决方案

使用这一个:


$ b $ (如果(A1:A6 = 1889,B1:B6))
/ code>

,然后按 CTRL + SHIFT + ENTER < kbd>来评估它。



测试工作簿


I've got a column of bus stop ID numbers (Column A) and Column B are various timings of which each value is the time a person boards/alights the bus. In order to know how long the bus is stopped, I want to find the difference between the max/min in Column B given a certain value of A.

84009   9:17:38 AM
84009   9:17:40 AM
84009   9:17:41 AM
84009   9:17:43 AM
84009   9:17:50 AM
84009   9:17:55 AM
84029   9:22:47 AM
84029   9:22:47 AM
84029   9:22:49 AM
84029   9:22:50 AM
84019   9:23:49 AM
83049   9:28:19 AM
82069   9:32:32 AM
82069   9:32:49 AM
82049   9:33:58 AM
82049   9:33:58 AM
82049   9:33:59 AM
82049   9:34:02 AM
82049   9:34:10 AM
82029   9:35:13 AM

So the first 7 rows should print 00:00:17, the next 4 is 00:00:04 etc. since they are of the same A value. Is this possible? Feel like its getting close but not quite. Thanks a million. Any help would be greatly appreciated

解决方案

Use this one:

=MAX(IF(A1:A6=1889,B1:B6))-MIN(IF(A1:A6=1889,B1:B6))

and press CTRL+SHIFT+ENTER to evaluate it.

Test workbook

这篇关于给定列A中的值,在EXCEL中的列B中找到最小/最大值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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