Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Relative Range in a Formula

I have a relative range that I need to capture in a SUM formula, recording
the macro gives me this. Is there a way to capture the true range?


This is what's in my SUB...
ActiveCell.FormulaR1C1 = "=SUM(R[-66]C:R[-1]C)"

Thanks!!




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Relative Range in a Formula

Never mind found it...

SUMMING A RANGE

With ActiveCell
Set ColRange = Range(.Offset(-1), .Offset(-1).End(xlUp))
.Formula = "=sum( " & ColRange.Address(RowAbsolute:=False) & ")"
End With





"Alex" wrote:

I have a relative range that I need to capture in a SUM formula, recording
the macro gives me this. Is there a way to capture the true range?


This is what's in my SUB...
ActiveCell.FormulaR1C1 = "=SUM(R[-66]C:R[-1]C)"

Thanks!!




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
Relative Range Reference in a sumifs formula cbotos Excel Worksheet Functions 6 April 1st 10 02:59 AM
COPYING FORMULA CONTAINING NAMES/RELATIVE RANGE NAMES Bricol Excel Discussion (Misc queries) 0 July 8th 08 03:54 PM
name range from absolute to relative WCO Excel Worksheet Functions 9 December 13th 06 08:13 PM
How to get relative range? Jan Nademlejnsky[_2_] Excel Programming 5 February 25th 04 08:21 PM
Making a relative range in VBA aapjaap Excel Programming 1 October 10th 03 02:17 AM


All times are GMT +1. The time now is 10:38 PM.

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

About Us

"It's about Microsoft Excel"