使用最大/最小函数来记住 Excel 中动态数据的高点/低点
我有 Excel 中显示的动态数据。数据本身是使用 COM 从外部应用程序中提取的,它基本上是随时间变化的数字(例如,从天气网站接收的外部温度)。
是否有一些方便的方法来存储在某个时间段内观察到的值的 MIN/MAX() 而不使用 VBA 和宏?在 max_cell
中使用简单的公式,如 =IF(data_cell>max_cell, data_cell, max_cell)
给出循环引用。
I have dynamic data shown in Excel. The data itself is pulled using COM from external application, and it is basically number changing over time (for example, outside temperature which is received from weather website).
Is there some convenient way to store MIN/MAX() of value observed during some period without use of VBA and macroses? Using simple formula in max_cell
like =IF(data_cell>max_cell, data_cell, max_cell)
gives circular reference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您打开迭代,那么循环引用将在连续的基础上正常工作
,而不是 IF,您可以在 A1 中使用(其中 A1 是 max_cell,A2 data_cell)
=MAX(A1,A2)
启用迭代
If you turn Iteration on then the circular reference will work ok on a continuous basis
And rather than an IF you can just use in A1 (where A1 is max_cell, A2 data_cell)
=MAX(A1,A2)
Enabling Iteration
感谢您要求非 VBA 解决方案,但我会提供一个,因为它的实现和理解非常简单。我将把它留给你,无论你是否想使用它。
假设您的数据在工作簿的
Sheet1
中的组织方式如下:每当
Temp
时,以下代码都会更新Max
和Min
> 更改:为了清楚起见,要从工作表添加此代码:
更改
I appreciate you asked for a non VBA solution but I will offer one as it is quite trivial to implement and understand. I'll leave it up to you whether you want to use it or not.
Suppose your data is organised as follows in
Sheet1
of your workbook:The following code will update
Max
andMin
wheneverTemp
changes:For clarity, to add this code from worksheet:
Worksheet
in left hand drop down menu and thenChange
in right hand drop down