+ Reply to Thread
Results 1 to 5 of 5

INDEX Reference Array Problem

  1. #1
    Registered User
    Join Date
    06-12-2014
    MS-Off Ver
    Office 2007
    Posts
    5

    Question INDEX Reference Array Problem

    Hi everyone,

    I have products from different countries with sales in different months. I want to use INDEX formula to sum together only a designated number of months. I have attached a sample excel to better explain.

    For example I want to find UK apple sales in last 3 months in column J and worldwide apple sales in the last 3 months in column K. The number of months is designated in the column C. As the array I chose from column D to I, and wanted to use SUMIF+INDEX function to find worldwide fruit sales. However I wasn't able to sum only a part of my array.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: INDEX Reference Array Problem

    Using your example:

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


    Obviously it's hard to know if this is a small set of sample data in context of real dataset... be wary of using SUMPRODUCT en masse or with large ranges.

  3. #3
    Registered User
    Join Date
    06-12-2014
    MS-Off Ver
    Office 2007
    Posts
    5

    Re: INDEX Reference Array Problem

    thank you very much.

    can you suggest a more feasbile formula to use with large ranges instead of second formula?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: INDEX Reference Array Problem

    Hmm... well, in truth it really depends on the real problem and size of data / no. of calculations.

    SUMPRODUCT (like Arrays) are iterative by nature and thus are *expensive* in terms of overhead.

    Is the range dynamic over time or fixed dimension?

    How many rows of data will you be applying the SUMPRODUCT too?

    Looking at the example I cannot see an elegant solution as such given the variation... but using your sample file to illustrate alternative...

    To facilitate standard SUMIF you need the criteria dimension to mirror that of the summation range - i.e. replicate Distributor

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


    Your World Total calcs are then *simplified*:

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


    So a classic case of Excel-itis insofar as more "light-weight" formulae are often more efficient than fewer "elegant" formulae

  5. #5
    Registered User
    Join Date
    06-12-2014
    MS-Off Ver
    Office 2007
    Posts
    5

    Re: INDEX Reference Array Problem

    Thank you again DonkeyOte . For my work is with only about 500 rows, the first SUMPRODUCT formula is ok to go. But i will also consider the second option with large rows.

    Best regards.

+ 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] Designate a Tab for array or reference for INDEX
    By BHammy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2012, 11:10 AM
  2. Problem using .Index in Array
    By thekeel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2011, 05:27 PM
  3. Array index, match problem
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 162
    Last Post: 09-06-2005, 07:05 PM
  4. Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. [SOLVED] Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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