+ Reply to Thread
Results 1 to 10 of 10

Decoding an excel formula on sumproduct

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,101

    Re: Decoding an excel formula on sumproduct

    Hi PoonamKhatri,

    There's an error on your formula that you post on the thread...so a little correction here and also the explanation of the SUMPRODUCT formula.

    SUMPRODUCT(Inventory!C$3:Inventory!C7,INDIRECT(ADDRESS(ROW(FC!$A$2006)-Inventory!$A7+1,COLUMN(FC!B$4),,,"FC")):FC!B$2006)
    This INDIRECT formula basically turns into FC!$B$2002
    Breakdown of formula and it's result:

    Inventory!C$3:Inventory!C7: Look at the range of C3:C7 in [Inventory] sheet. Result in {5;10;10;10;10}

    ROW(FC!$A$2006): Returns the row index in cell A2006 in [FC] sheet. Result in 2006 (because A1 is row 1, A100 is row 100, thus A2006 is 2006)

    COLUMN(FC!B$4): Returns the column index in cell B4 in [FC] sheet. Result in 2 (because column A is 1, column B is 2)

    ADDRESS function has the following properties:
    ADDRESS(row_num, column_num, [abs_num],[a1], [sheet_text]) - here row_num and column_num is mandatory, and the rest are optional.

    Given that
    ADDRESS(ROW(FC!$A$2006)-Inventory!$A7+1,COLUMN(FC!B$4),,,"FC"), and we know that the ROW() and COLUMN(), it thus becomes
    ADDRESS(2006-Inventory!$A7+1,2,,,"FC") which simplifies further to
    ADDRESS(2006-5+1,2,,,"FC") which simplifies further to
    ADDRESS(2002,2,,,"FC").
    And finally reads as "FC!$B$2002". Note that at this point this is only a text or string. Not an Excel Range.

    This then gets put into the INDIRECT function:
    INDIRECT(ADDRESS(...)) technically ask INDIRECT function to turn the string that we derived from ADDRESS function into an excel range.

    And finally it turns into a range that is used for the SUMPRODUCT:

    SUMPRODUCT(Inventory!C$3:Inventory!C7, INDIRECT("FC!$B$2002"):FC!B$2006) notice that double quote
    SUMPRODUCT(Inventory!C$3:Inventory!C7, FC!$B$2002:FC!B$2006) and thus becomes
    {5;10;10;10;10} * {1.38E-15; 1.43E-15, 1.5E-15, 1.59E-15, 1.69E-15}
    Last edited by dluhut; 12-16-2021 at 07:07 PM.

  2. #2
    Registered User
    Join Date
    12-16-2021
    Location
    Madison
    MS-Off Ver
    365
    Posts
    6

    Re: Decoding an excel formula on sumproduct

    Thank you so much for this detailed decoding. I would sincerely appreciate if you can simplify further on how you decoded the address of rows and column to reach this: FC!$B$2002.

    I need to understand so that I can recreate a similar formula that I can drag down.

    Thank you,

    Poonam

+ 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] Vlookup formula Decoding help needed...
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2014, 03:56 PM
  2. decoding formula assistance
    By eehimes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2014, 01:44 PM
  3. Replies: 2
    Last Post: 06-20-2014, 12:42 PM
  4. Decoding an excel formula
    By nadeemsmarty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-12-2014, 01:15 PM
  5. Encoding-Decoding
    By laxmanann in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-09-2014, 02:33 AM
  6. Base64 decoding using excel function
    By deepak1986 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2012, 02:21 PM
  7. decoding formula issue
    By Ricersux in forum Excel General
    Replies: 1
    Last Post: 02-18-2008, 12:02 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