Re: Variable cumulative R1C1(??) notation
- From: ewan7279 <ewan7279@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Aug 2008 05:37:01 -0700
....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.
|
- References:
- Variable cumulative R1C1(??) notation
- From: ewan7279
- Re: Variable cumulative R1C1(??) notation
- From: Jim Rech
- Re: Variable cumulative R1C1(??) notation
- From: ewan7279
- Variable cumulative R1C1(??) notation
- Prev by Date: RE: Sub before and after 'Get External Data"
- Next by Date: Re: Creating a table based on user input
- Previous by thread: Re: Variable cumulative R1C1(??) notation
- Next by thread: Re: Variable cumulative R1C1(??) notation
- Index(es):