Re: Variable cumulative R1C1(??) notation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



....so the last row in the table is the constant rather than the 4th row?

"ewan7279" wrote:

Hi Jim,

thanks for your reply, but this actually sums the cumulative total down from
G4, rather than up from the last value in column G, which is what I really
want this to do. Is this possible through a formula, or will I have to
resort the data etc (which I'd rather avoid as, logically, it only makes
sense to sum up from the bottom of this particular stack of data)?

"Jim Rech" wrote:

One way:

Range(Range("G4"), Range("G4").End(xlDown)).Offset(0, 1).FormulaR1C1 _
= "=SUM(R4C[-1]:RC[-1])"


--
Jim
"ewan7279" <ewan7279@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D8A5DE7C-290C-456E-8820-DD2782B6D006@xxxxxxxxxxxxxxxx
| Hi all,
|
| I have some code that updates a table of information. This table is a
| different number of rows in length each time. I need a cumulative total
in
| column H to add up column G in the table from the bottom up, so the bottom
| total equals the value in the cell to the left, the next cell up equals
the
| previous total plus the cell to the left and so on. So far, I have:
|
| Dim EndRng as Range
| Dim formulaconst as String
|
| ------
|
| Sheets(1).Range("G4").End(xlDown).Select 'selects the first value to be
| totalled
| EndRng = ActiveCell 'defines the range of the value
| formulaconst = ActiveCell.Address 'to enter into formula(??)
| EndRng.Offset(0, 1).Select 'first cell to enter formula
| ActiveCell.Formula = "=" & formulaconst 'I can't get further than this!!
|
| Please help.
| Ewan.
|



.



Relevant Pages

  • Re: Variable cumulative R1C1(??) notation
    ... but this actually sums the cumulative total down from ... sense to sum up from the bottom of this particular stack of data)? ... | total equals the value in the cell to the left, ... | Dim formulaconst as String ...
    (microsoft.public.excel.programming)
  • Re: SUM formula for data from one column when another is populated
    ... On Jun 27, 9:46 pm, Barb Reinhardt ... it pulls the number from another column and sums it in a ... cell at the bottom of the worksheet.- Hide quoted text - ... in the corresponding row and sum in a cell at the bottom of the sheet. ...
    (microsoft.public.excel.programming)
  • Re: Summing Columns Based On Value
    ... count how many rows are labelled database ... > I would like a cell at the bottom of the worksheet that sums each ...
    (microsoft.public.excel.programming)
  • Re: Calc time with a lookback #2
    ... To calculate running totals we need a data set of daily totals and dates. ... other data not shown here would be a cell that sums for day, ... >> You say that you have date of flight in A1, ...
    (microsoft.public.excel.misc)
  • Re: Calc time with a lookback #2
    ... To calculate running totals we need a data set of daily totals and dates. ... other data not shown here would be a cell that sums for day, ... You say that you have date of flight in A1, ...
    (microsoft.public.excel.misc)