+ Reply to Thread
Results 1 to 4 of 4

Creating a range within INDIRECT Function (help needed)

  1. #1
    Registered User
    Join Date
    02-14-2023
    Location
    US
    MS-Off Ver
    365
    Posts
    2

    Creating a range within INDIRECT Function (help needed)

    I am trying to update a function so that cell references A3 and A4 become range references. For example, I have 10 worksheets I want to sum cell F38 from. A3 would be Sheet 1 and A4 would be sheet 10. Right now it is only summing F38 from Sheet 1 and Sheet 10, and nothing in-between. Does anyone have a fix? See below for current formula.

    This is also a formula where I would like to keep A3 and A4 to updatable references, for example I would easily be able to change the "values" within those cells so that I can expand the reference in the future.

    =SUMPRODUCT(SUMIF(INDIRECT("'"&A3:A4&"'!f38"),"<>0"))
    Attached Files Attached Files
    Last edited by Liondj77; 02-14-2023 at 03:27 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: Creating a range within INDIRECT Function (help needed)

    These formulae all produce the same result:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note that you can add dummy Start and End worksheets that bracket the sheets you want to sum.

    Can't help thinking that SUMIF(… , "<>0") is redundant … if a cell has a zero value, it won't affect the sum.

    You do need to list all the sheets.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-14-2023
    Location
    US
    MS-Off Ver
    365
    Posts
    2

    Re: Creating a range within INDIRECT Function (help needed)

    Yes, I guess the real question here is if there is a way to get it to sum the cell in each sheet without needing to list all the sheets. That is the formula I am really trying to create here. Each quarter I have to adjust the A2:A11 range for hundreds of formulas (so next quarter I'd have to update it to A2:A12, for example) and want a work around so I only have to list Sheet #1 to the last Sheet in the range. Ex. List Sheet 1 in cell A2 and Sheet 10 (or last in the range) in cell A3.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: Creating a range within INDIRECT Function (help needed)

    Your best bet, IMO, is to use the Start:End worksheets approach. They can, if you wish be hidden. Then all you need to do is include the sheets you want to sum in between the Start and End sheets. Equally, if you want to exclude any sheets, you can drag them outside the "bookends". You would not need to change any formulae or any "ranges".

    I did try variations on your original formula but had no joy.

+ 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] Issue creating a dependent drop down list with indirect function
    By Grilleman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-04-2022, 02:23 AM
  2. [SOLVED] Possible Indirect Function Needed or Any feasible method
    By cvici in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-30-2021, 01:42 PM
  3. Help creating a function with indirect ref
    By nymark in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2020, 02:45 PM
  4. Help needed with 'Indirect' function
    By sumdumgai in forum Excel General
    Replies: 6
    Last Post: 03-06-2017, 12:01 AM
  5. [SOLVED] HELP NEEDED: INDIRECT combined with ROW function
    By dtheb in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-20-2016, 12:41 PM
  6. Multi Tier - Match & Vlookup or INDEX or INDIRECT function help needed
    By yogananda.muthaiah in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2016, 12:32 AM
  7. [SOLVED] Foruma needed to integrate indirect and sumif function
    By VincentNL in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2014, 10:45 AM

Tags for this Thread

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