Archive of Mr Excel Message Board

Back to Excel VBA archive index
Back to archive home

accumulate values in a single cell
Posted by Peter on January 21, 2002 4:40 PM
I wish to show a Month to Date $ value in a single cell using daily input of production hours x $ rate.
I used simple formulae to achieve the daily total but am stumped on how to add it to the previous days total.

| Check out our Excel VBA Resources
|
 |
 |
 |
 |
 |
Re: accumulate values in a single cell
Posted by Jacob on January 21, 2002 5:14 PM
Hi
Lets say the running total is in A1 and the current days total is in B1 then
Sub MyMacro()
range("A1").formulaR1C1 = range("A1").value + range("B1").value
end sub
HTH
Jacob

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.