Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Need interpretation

Sub test()
Range("A1").End(xlDown).Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" <<See Note
End Sub

First please verbalize the "=SUM(R[-7]C:R[-1]C)" syntax, I can't get it..

<<Note : this line created separately using Macro recorder with Cell A8
active at the time. It appears to be an absolute address (with the 7 in
it).
How can I change the "=SUM(R[-7]C:R[-1]C)" portion
on code to always run from one cell up to the top row of my column?

Thanks in Advance,,



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need interpretation

it means to sum in the current column -7 cells up from this cell down to -1
cell from this cell (this cell being the cell with the formula). To sum
from the first cell in the column of the active cell to one cell above the
active cell, you would use
ActiveCell.FormulaR1C1 = "=SUM(R1C:R[-1]C)"

R1C is absolute R1 this column
R[-1]C is the cell above the cell with the formula (this is relative to
row)

--
Regards,
Tom Ogilvy


"JMay" wrote in message news:iBqsb.5942$5e.491@lakeread06...
Sub test()
Range("A1").End(xlDown).Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" <<See Note
End Sub

First please verbalize the "=SUM(R[-7]C:R[-1]C)" syntax, I can't get

it..

<<Note : this line created separately using Macro recorder with Cell A8
active at the time. It appears to be an absolute address (with the 7 in
it).
How can I change the "=SUM(R[-7]C:R[-1]C)" portion
on code to always run from one cell up to the top row of my column?

Thanks in Advance,,





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Need interpretation

Thanks Tom; I've printed your comments in order to study.
JMay

"Tom Ogilvy" wrote in message
...
it means to sum in the current column -7 cells up from this cell down

to -1
cell from this cell (this cell being the cell with the formula). To sum
from the first cell in the column of the active cell to one cell above the
active cell, you would use
ActiveCell.FormulaR1C1 = "=SUM(R1C:R[-1]C)"

R1C is absolute R1 this column
R[-1]C is the cell above the cell with the formula (this is relative to
row)

--
Regards,
Tom Ogilvy


"JMay" wrote in message

news:iBqsb.5942$5e.491@lakeread06...
Sub test()
Range("A1").End(xlDown).Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" <<See Note
End Sub

First please verbalize the "=SUM(R[-7]C:R[-1]C)" syntax, I can't get

it..

<<Note : this line created separately using Macro recorder with Cell

A8
active at the time. It appears to be an absolute address (with the 7 in
it).
How can I change the "=SUM(R[-7]C:R[-1]C)" portion
on code to always run from one cell up to the top row of my column?

Thanks in Advance,,







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dsum formula interpretation maud0361 Excel Worksheet Functions 2 December 27th 08 05:56 PM
Interpretation of a piece of code FARAZ QURESHI Excel Discussion (Misc queries) 3 December 30th 07 11:29 PM
Interpretation for: =INDEX(MATCH(1 <--one [email protected] Excel Discussion (Misc queries) 3 August 24th 07 08:40 AM
Interpretation M&M[_2_] Excel Discussion (Misc queries) 2 July 14th 07 12:00 PM
value interpretation solo_razor[_28_] Excel Programming 1 November 6th 03 02:44 PM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"