+ Reply to Thread
Results 1 to 3 of 3

Using variables for relative reference in formula

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Thumbs up Using variables for relative reference in formula

    Hi,

    I'm trying to do a simple calculation that uses a variable to define a reference row in a formula as the number of rows I have in my sheet may change.

    I have used the folloiwng code:

    Please Login or Register  to view this content.
    If I substitute the 1-LastRow for a value it works but I need it to be a variable! What am I missing??
    Last edited by goincrazy; 11-10-2011 at 08:29 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Using variables for relative reference in formula

    Hello goingcrazy,

    You need to remember that Formulas are Strings and must be manipulated as such.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-18-2010
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Using variables for relative reference in formula

    Hi Leith,

    That's solved the problem. Thanks for your help!

    goincrazy

+ Reply to Thread

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