scu*_*ffe 4 excel vba excel-vba excel-formula
样本数据
A B
1 Date Amount
2 Apr 1 $6,000
3 May 1 $4,250
4 June 1 $2,750
5 July 1 $1,000
6 Aug 1 -$0.075 <- This Cell/Row
7 Sept 1 -$0.2500
Run Code Online (Sandbox Code Playgroud)
在一列数字(实际上是100-200行)中,当价值变为负数时,例如,如果我们是贷款欠款,那么贷款将由此支付.请注意,这些数字之间的实际差异会根据利息,税金,一次性付款等因素而波动.因此,我不能只计算(总计/付款)=月数.
有没有办法使用Excel的公式来确定这个?这可能是需要VBA的情况(这很好),但如果我可以避免它,我想.
match函数返回一个范围索引
=MATCH(matchValue, range, matchType: 0=exact, 1=greater than, -1=less than
=MATCH(0, B2:B7, -1)
Run Code Online (Sandbox Code Playgroud)
匹配范围B2:B7中小于0的第一个单元格.从您的示例数据中,这将返回5
使用"偏移"功能可根据索引值返回特定单元格
| 归档时间: |
|
| 查看次数: |
24816 次 |
| 最近记录: |