加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

vb.net – Excel公式计算diff b / w第一个值和列中的最后一个值(

发布时间:2020-12-17 07:30:31 所属栏目:百科 来源:网络整理
导读:我有以下列:(使用Excel公式) A B ------------------------1 | Date | Value | ------------------------2 | 8/20/2011 | 92.8 |3 | 8/21/2011 | 92.4 |4 | 8/22/2011 | 91.8 |5 | 8/23/2011 | 90.7 |6 | 8/24/2011 | 91.1 |7 | 8/25/2011 | |8 | 8/26/2011
我有以下列:(使用Excel公式)

A            B
  ------------------------
1 |  Date     |   Value  |
  ------------------------
2 | 8/20/2011 |   92.8   |
3 | 8/21/2011 |   92.4   |
4 | 8/22/2011 |   91.8   |
5 | 8/23/2011 |   90.7   |
6 | 8/24/2011 |   91.1   |
7 | 8/25/2011 |          |
8 | 8/26/2011 |          |
9 | 8/27/2011 |          |
  ------------------------

I want to calculate the difference between 1st Value (B2) and last Value (last populated row in column B)

编辑:

使用公式:= B2-B6不是必需的. (我想在Cell C2中使用diff)

我想当用户在B7中输入值时它自动显示B2和B7之间的差异,当他填充B8然后它显示B2和B8之间的差异,依此类推.

I don’t want some direct method to do this in Excel and not by iterating all values to check the last value. Please suggest the best method to this in Excel.

这更像是一个逻辑问题!

欢迎使用纯Excel解决方案,我可以手动完成.

编辑:
使用Excel公式!

我希望我能正确解释我的问题..

解决方法

如果标题位于A1和B1中,并且您的表格为A2:B9,请使用以下公式:

=$B$2-OFFSET($B$2,COUNTA($B$2:$B$9)-1,1,1)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读