+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT or array formula help please!

  1. #1
    Forum Contributor
    Join Date
    04-13-2006
    Location
    London
    Posts
    102

    SUMPRODUCT or array formula help please!

    I need to create a formula to calculate the total amount from any investment into Schroder from the following example list:

    Please Login or Register  to view this content.
    So the formula would need to ensure that only the figures from column B are counted when the first 8 characters in column A = "schroder".

    The total in the above example would be £38,000.

    I've tried a SUMPRODUCT formula, namely:

    SUMPRODUCT((B1:B5)*(LEFT(A1:A5, 8) = "schroder"))

    But this doesn't work. I think you can see what I'm trying to achieve.

    Maybe an array formular will solve this, but I'm not experienced enough with them.

    Please could you point me in the right direction? Thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Try

    =SUMPRODUCT(--(ISNUMBER(SEARCH("Schroder",$A$1:$A$5))*(B1:B5)))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    04-13-2006
    Location
    London
    Posts
    102
    Thanks, that's solved it perfectly!!!

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad it helped

    VBA Noob

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    I don't see why

    =SUMPRODUCT((B1:B5)*(LEFT(A1:A5,8)="schroder"))

    doesn't work, unless you have spaces or other non-printing characters at the start.....but you don't need SUMPRODUCT for a single criterion, SUMIF will suffice

    =SUMIF(A1:A5,"*schroder*",B1:B5)

+ 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