+ Reply to Thread
Results 1 to 4 of 4

cell reference change

  1. #1
    Registered User
    Join Date
    03-21-2010
    Location
    new york, usa
    MS-Off Ver
    Excel 2003
    Posts
    3

    cell reference change

    here is the question I have, any help and comments are much appreciated:
    sheet 1 has a 50000x12 matrix(MA) and a 12x1 matrix (MB), I want to get a new matrix of 1000x50 to multiply them by having first 50 rows in each column from MA to multiple MB.
    therefore, in the sheet 2 column A, the formula in each cell is :
    A1: sumproduct(MA(A1:A50),MB($A$1:$A$12))
    A2: sumproduct(MA(A51:A100),MB($A$1:$A$12))
    A3: sumproduct(MA(A101:A150),MB($A$1:$A$12))
    ......
    A1000: sumproduct(MA(A49950:A50000),MB($A$1:$A$12))
    ......
    B1: sumproduct(MA(B1:B50),MB($A$1:$A$12))
    B2: sumproduct(MA(B51:B100),MB($A$1:$A$12))
    B3: sumproduct(MA(B101:B150),MB($A$1:$A$12))
    .....
    B1000: sumproduct(MA(B49950:B50000),MB($A$1:$A$12))

    .....
    until column L is filled.

    is there an easy to write the formula? pls help

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: cell reference change

    Hi freaksugar, welcome to the forum. Try

    A1: sumproduct((INDEX($A:$A,(ROW()-1)*50+1):INDEX($A:$A,ROW()*50))*($A$1:$A$12))

    copy down. Along the same vein

    B1: sumproduct((INDEX($B:$B,(ROW()-1)*50+1):INDEX($B:$B,ROW()*50))*($A$1:$A$12))

    copy down

  3. #3
    Registered User
    Join Date
    03-21-2010
    Location
    new york, usa
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: cell reference change

    Thank you!!!

    Can i ask you another question to extend this further?

    For example, if I would like to sumproduct 2 matrices as following:

    in the sheet 2 column A, the formula in each cell is :
    A1: sumproduct(MA(A3:O3),MB($A$1:$A$12))
    A2: sumproduct(MA(A53:O53),MB($A$1:$A$12))
    A3: sumproduct(MA(A103:O103),MB($A$1:$A$12))
    ......
    A1000: sumproduct(MA(A50003:O50003),MB($A$1:$A$12))
    ......
    B1: sumproduct(MA(A4:O4),MB($A$1:$A$12))
    B2: sumproduct(MA(A54:O54),MB($A$1:$A$12))
    B3: sumproduct(MA(A104:O104),MB($A$1:$A$12))
    .....
    B1000: sumproduct(MA(A50004:O50004),MB($A$1:$A$12))

    should i write this?

    A1: sumproduct((INDEX($A:$O,(ROW(3)-1)*50+1):INDEX($A:$O,(ROW(3)-1)*50+1))*($A$1:$A$12))

    then

    B1: sumproduct((INDEX($B:$O,(ROW(3)-1)*50+1):INDEX($B:$O,(ROW(3)-1)*50+1))*($A$1:$A$12))
    ?

    Thanks again if you could look at it....

  4. #4
    Registered User
    Join Date
    03-21-2010
    Location
    new york, usa
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: cell reference change

    :D

    should it be:
    =SUMPRODUCT((INDEX($A:$A,(ROW()-1)*50+1):INDEX($o:$o,(ROW()-1)*50+1))*MB('$A$16:$L$16))

    it works..thank you!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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