开发者

Google Spreadsheet - Calculate Range of Rows

I have the following formula =B4+(B8*(C8*D8)) to calculate a balance for a fake Stock Market account.

B4 is the starting balance. B8 determines to buy or sell (1 or -1) C8 is the volume D8 is the price paid

I want to be able to do this calculation for 100 or 200 rows. Is there a way to rewrite this formula but use 开发者_JAVA技巧a range.

Basically I want an easier way to write this =B4+((B8*(C8*D8))+(B9*(C9*D9))+etc,etc)

Thanks for the help.

EDIT

I forgot to mention this formula is applied to cell D4. This is the current balance cell.


You can click the cell with the formula, grab the little blue box in the bottom left and drag it down. This will automatically change the formula. If you don't want a reference to change, put a $ before it.

For example, if you want all formulas to reference B4, then $B$4.


Formula for cell D4

=B4+SUMPRODUCT(B8:B208,C8:C208,D8:D208)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜