+ Reply to Thread
Results 1 to 4 of 4

Variable cell references

  1. #1
    Registered User
    Join Date
    06-18-2007
    Posts
    11

    Variable cell references

    I have a large group of formulas that all relate to the same row range.
    But each time I use them the row range is different. Sometimes the range is 1 (456:456) and sometimes it is 24 (876:899).
    Is there a way to write the formulas with variables for rowstart & rowend?
    So that I only need enter rowstart and rowend once each time I use the group of formulas instead of manually modifying 13 different formulas with the new row values.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you enter your start range and end range row numbers in 2 cells, say J1 and J2 then you can use the Index() function to convert that to cell addresses.

    e.g. if you want to Sum cells from A1 to A10 and you put 1 in J1 and 10 in J2, then the formula would be:

    =SUM(INDEX(A:A,J1):INDEX(A:A,J2))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-18-2007
    Posts
    11
    Wow, that was a fast and spot-on response.
    I tried it and it works perfect. You have saved me a LOT of time.

    Thank You very much.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by griz
    Wow, that was a fast and spot-on response.
    I tried it and it works perfect. You have saved me a LOT of time.

    Thank You very much.

    Great! You're Welcome!

+ 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