+ Reply to Thread
Results 1 to 8 of 8

OFFSET or INDIRECT formula - not sure

  1. #1
    Registered User
    Join Date
    02-09-2016
    Location
    Pell City, AL
    MS-Off Ver
    2013
    Posts
    3

    OFFSET or INDIRECT formula - not sure

    I have a very large spreadsheet with 12 worksheets (one for each month) and one Year To Date worksheet. On the YTD worksheet I would like to add just the totals from the other 12 worksheets. The totals are all 8 rows apart starting in cell D10 going through D1066.

    I would like to have my formula automatically advance by 8 rows. Example: D10 would be the constant in the first formula. D18 would be constant in the next, D26 in the next and so on.

    Example:
    First formula is =SUM(Jan!D10+Feb!D10+Mar!D10)
    Next formula is =SUM(Jan!D18+Feb!D18+Mar!D18)
    nets would be D26 and so on.

    Is there a way to drag this formula yet have it advance by 8 rows instead of 1 row?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: OFFSET or INDIRECT formula - not sure

    How many of these formulas are you going to have?
    Are you just trying to avoid having to update 12 lots of row references in each formula? If so you could use something like =SUM(Jan:Dec!D10) which would require the need to update far less.

    If that's no use to you, perhaps post a sample workbook so we can fully understand your data layout?
    It can more than likely be done with INDIRECT, but it's not always an ideal option due to it's volatile nature.

    BSB

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: OFFSET or INDIRECT formula - not sure

    Quote Originally Posted by carolynoi View Post
    First formula is =SUM(Jan!D10+Feb!D10+Mar!D10)
    What cell will that formula be entered in?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    02-09-2016
    Location
    Pell City, AL
    MS-Off Ver
    2013
    Posts
    3

    Re: OFFSET or INDIRECT formula - not sure

    It will start in D3 with =SUM(Jan!D10+Feb!D10+Mar!D10)
    Then D4 with =SUM(Jan!D18+Feb!D18+Mar!D18)
    Then D5 with =SUM(Jan!D26+Feb!D26+Mar!D26)
    Then D6 and so on...

  5. #5
    Registered User
    Join Date
    02-09-2016
    Location
    Pell City, AL
    MS-Off Ver
    2013
    Posts
    3

    Re: OFFSET or INDIRECT formula - not sure

    Now I feel like a dummy. Of course this will work =SUM(Jan:Dec!D10)

    I believe I was over thinking the whole situation. It has to be copied 136 times but this is much simpler that my long formula.

    Thank you

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: OFFSET or INDIRECT formula - not sure

    There are ways of doing this without the need to alter the formulas at all. However they're not quite so straightforward.

    In the attached, the yellow section is a range named "SheetNames". For this method to work this list must be an accurate list of the sheet names you're going to sum.

    The named range doesn't have to be where it is. It could easily be tucked away on a hidden sheet. I've just left it there so you can see what's going on.

    I've added a formula to the green cells that can be dragged down and will hopefully do that you need here.

    I'm sure the formula can be tidied up a little, but it works.

    BSB
    Attached Files Attached Files
    Last edited by BadlySpelledBuoy; 02-09-2016 at 04:36 PM. Reason: EDIT: Adding additional info

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: OFFSET or INDIRECT formula - not sure

    If you only had a few months to total...

    =INDEX(Jan!D$10:D$1066,ROWS(D$3:D3)*8-8+1)+INDEX(Feb!D$10:D$1066,ROWS(D$3:D3)*8-8+1)+INDEX(Mar!D$10:D$1066,ROWS(D$3:D3)*8-8+1)

    Copied down as needed

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: OFFSET or INDIRECT formula - not sure

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (note: this change is not optional )
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] improve formula offset and indirect
    By Biff in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 07:05 AM
  2. [SOLVED] improve formula offset and indirect
    By Biff in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  3. improve formula offset and indirect
    By Biff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  4. improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. [SOLVED] improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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