+ Reply to Thread
Results 1 to 14 of 14

SumProduct with Range Increment..

  1. #1
    Registered User
    Join Date
    07-06-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    73

    SumProduct with Range Increment..

    Hello..

    How to use Sumproduct with Cell Range from Data Sheet with Increment...

    I have one query. Sample file with query enclosed..

    Please help me in this as I need to copy every time same formula and change the range accordingly.

    Thanks..

    Kundanlal
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: SumProduct with Range Increment..

    Here, try this in C5 and extend right and down:

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

  3. #3
    Registered User
    Join Date
    07-06-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    73

    Re: SumProduct with Range Increment..

    Thanks for quick reply..

    I have tried with actual data base where my sumproduct output cell starts at cell AO(8), getting error..Formula used is
    =SUMPRODUCT(OFFSET(('[Distributor Data-February 2016-RoMG.xls]GS 15-16'!$L$4:$L$3310),0,3*ROW(AO8)+COLUMN(AO8)-53)*('[Distributor Data-February 2016-RoMG.xls]GS 15-16'!$A$4:$A$3310=$A$1))/100

    Error : #VALUE!..

    Also, would you mind explaining the process flow of Offset formula in this case..

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: SumProduct with Range Increment..

    When start writting (any) formula you can click on it and it will show you details.

    In this case OFFSET(reference, rows, cols, [height], [width])

    That means from reference range ($A$4:$A$3334, from which you want to base the offset) you must move certain number of rows (0) and columns (12, 15, 18).

    Now since you move from rows 5,6,7 to columns 12, 15, 18 that's formula: 3*X - 3.
    But second number 3 is also dinamic because next column (D) you need to move -2 (or whole offset 3*X-2).

    In you case you moving from L column (GS 15-16'!$L$4:$L$3310) by 0 rows and 3*ROW(AO8)+COLUMN(AO8)-53 (that's 12) columns, getting column X as result.

    So what you doing with sumproduct is (shorter formula without sheet reference, just column):

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


    If you don't have numbers in X column then that's the reason why you get #VALUE! error.

  5. #5
    Registered User
    Join Date
    07-06-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    73

    Re: SumProduct with Range Increment..

    Thanks for explaining.. But again I got confused.. I will sort out this..

    I am attaching actual data with some changes..

    If you can make the changes there (monthly report file)and sent back the file,

    I would study them and implement..

    Please don't mind.

    Thanks..

    Kundanlal
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: SumProduct with Range Increment..

    Try this instead, it should be a little more error resistant.

    Enter the formula into B8, then select B8:C26, press F2, then Ctrl Enter.

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


    This will match the scheme from column A of the report to row 2 of the distributor data, and match the heading of row 7 in the report to the array, {"Our","IND","SoW"} in order to find the correct column in the distribution data.

    The only time that you should see an error is when the scheme listed in column A of the report doesn't exist in row 2 of the distribution data.
    Last edited by jason.b75; 04-17-2016 at 06:49 AM.

  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: SumProduct with Range Increment..

    Quote Originally Posted by zbor View Post
    If you don't have numbers in X column then that's the reason why you get #VALUE! error.
    OFFSET doesn't work on closed files.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: SumProduct with Range Increment..

    In B8

    =SUMPRODUCT(OFFSET(('[Distributor Data-February 2016.xls]Feb 16'!$A$4:$A$10),0,MATCH($A8,'[Distributor Data-February 2016.xls]Feb 16'!$A$2:$BP$2,0)-1)*('[Distributor Data-February 2016.xls]Feb 16'!$A$4:$A$10=$A$1))/100

    in C8

    =SUMPRODUCT(OFFSET(('[Distributor Data-February 2016.xls]Feb 16'!$A$4:$A$10),0,MATCH($A8,'[Distributor Data-February 2016.xls]Feb 16'!$A$2:$BP$2,0))*('[Distributor Data-February 2016.xls]Feb 16'!$A$4:$A$10=$A$1))/100


    Copy/drag both down


    See Tony's post re OFFSET not working on closed files.

    Plus response fro Jason.
    Attached Files Attached Files
    Last edited by JohnTopley; 04-17-2016 at 07:23 AM.

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: SumProduct with Range Increment..

    In C5 , then drag across
    Please Login or Register  to view this content.
    If Start cell is not C5 make changes accordingly, ie $C$5 to be changed.
    $L$4:$AL$3334 range can be extended if required.

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: SumProduct with Range Increment..

    Oh, yes. That too. Thank you TV.

    Quote Originally Posted by Tony Valko View Post
    OFFSET doesn't work on closed files.

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

    Re: SumProduct with Range Increment..



    ----------

  12. #12
    Registered User
    Join Date
    07-06-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    73

    Re: SumProduct with Range Increment..

    Thanks all.. Will try solution provided..

  13. #13
    Registered User
    Join Date
    07-06-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    73

    Re: SumProduct with Range Increment..

    I have used following formula with actual database and values..

    =SUMPRODUCT((INDEX('[Distributor Data-February 2016-RoMG.xls]GS Feb 16'!$L$4:$AL$3334,,1+((ROW()-ROW($C$5))*3)+COLUMN()-COLUMN($C$5)))*('[Distributor Data-February 2016-RoMG.xls]GS Feb 16'!$A$4:$A$3334=$A$1))/100

    Works fine up to Certain increment, i.e. upto 28, and gives error #REF.. I have also checked actual database, there is no unusual data..what can be possible problem..

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: SumProduct with Range Increment..

    In the formula change this range
    $L$4:$AL$3334
    as
    $L$4:$ZL$3334
    Works upto 230

+ 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] Increment a range
    By rcguymike in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-06-2014, 01:56 PM
  2. Help with increment counter between date range
    By Rick_Hawk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-13-2014, 03:09 PM
  3. [SOLVED] Increment in Range of COUNTIF after adding a Row before Last Row.
    By dan-e in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-01-2013, 04:46 AM
  4. Increment cell range
    By djhatrick12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2011, 09:17 AM
  5. Increment range refrence in SUM formula...
    By raman9000 in forum Excel General
    Replies: 1
    Last Post: 04-08-2010, 12:18 AM
  6. Increment Range Cell in Do Loop
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2009, 03:03 PM
  7. Increment range reference in formula
    By XL_Newbie in forum Excel General
    Replies: 4
    Last Post: 12-08-2009, 01:46 AM

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