+ Reply to Thread
Results 1 to 6 of 6

Multiplying Arrays

  1. #1
    Registered User
    Join Date
    01-29-2010
    Location
    Leeds, england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Multiplying Arrays

    Hi

    anyone know the best way to multiply multiple arrays?

    I have 3 1D arrays W(), Wpos() & Wflag()

    i want to multiply each value in the array by the corresponding value in the other arrays

    any advice please?

    B

  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: Multiplying Arrays

    maybe use the worksheet function SUMPRODUCT(). It is designed to do just what you're describing.

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

    Re: Multiplying Arrays

    maybe would be usefull to upload example file and explain problem.
    Never use Merged Cells in Excel

  4. #4
    Registered User
    Join Date
    01-29-2010
    Location
    Leeds, england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Multiplying Arrays

    Quote Originally Posted by teylyn View Post
    maybe use the worksheet function SUMPRODUCT(). It is designed to do just what you're describing.
    Thanks Teylyn, tired this

    Please Login or Register  to view this content.
    but no avail?

    What do you think

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

    Re: Multiplying Arrays

    This
    Please Login or Register  to view this content.
    is missing several commas and a few brackets. Check your syntax.

  6. #6
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Multiplying Arrays

    hi Berabus,

    Welcome to the Forum
    I may be misunderstanding your question (or example) but... is there any particular reason why you are trying to do the multiplication in code rather than directly in the worksheet?
    Doing it directly in the worksheet is likely to be much quicker than looping cell by cell, especially if your real data set is large.
    From the example above, it appears that you could type
    Please Login or Register  to view this content.
    into cell C2 & copy it down as far as you need. If you really want this in a macro, you could record a macro of your actions as you do this.

    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

+ 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