Results 1 to 3 of 3

Absolute to Relative Referencing

Threaded View

  1. #1
    Registered User
    Join Date
    11-27-2009
    Location
    melbourne australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Absolute to Relative Referencing

    Hi All,

    I have the following code which inserts a sum formula in the activecell.

    Dim startRow As Integer
    Dim startCell As Range, endCell As Range
    startRow = 2
    With ActiveCell
    Set startCell = Cells(startRow, .Column - 1)
    Set endCell = .Offset(0, -12)
    .Formula = "=SUM( " & startCell.Address & ":" & endCell.Address & ")"
    My problem is that the sum formula is created with absolute references.
    I need the formula to be created with relative references for both the rows
    and the columns.

    Any ideas on how to change from absolute to relative referencing?

    Thanks,

    Steve
    Last edited by davesexcel; 11-30-2009 at 12:26 AM. Reason: Code tags are required when supplying code, check out the forum rules

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1