+ Reply to Thread
Results 1 to 4 of 4

sumproduct (range;range;value)

  1. #1
    Registered User
    Join Date
    09-23-2007
    Posts
    29

    sumproduct (range;range;value)

    i am creating a worksheet that adds the totals for an entire range (column), wherein any cell within the column that contains a certain number is added to the cell.

    i get this part. i used =sumif('sheet1'!A1:A100,"C4",'sheet1'!B1:B100). works perfect but,
    How can i SUM everything IF A1:A100 equals anything in C4:C80
    SUMIF(A1:A100;range;B1:B100)
    it does not work even with sumproduct
    Any idea?

  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,

    How can i SUM everything IF A1:A100 equals anything in C4:C80
    Do you mean the sum of C4:C80 equals the sum of A1:A100 ??

    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 Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You can use

    =SUMPRODUCT(SUMIF(A1:A100,C4:C80,B1:B100))

    but this will double count if any values are duplicated in range. To avoid that

    =SUMPRODUCT(--ISNUMBER(MATCH(A1:A100,C4:C80,0)),B1:B100)

  4. #4
    Registered User
    Join Date
    09-23-2007
    Posts
    29
    Quote Originally Posted by daddylonglegs
    You can use

    =SUMPRODUCT(SUMIF(A1:A100,C4:C80,B1:B100))

    but this will double count if any values are duplicated in range. To avoid that

    =SUMPRODUCT(--ISNUMBER(MATCH(A1:A100,C4:C80,0)),B1:B100)
    Thank you both for the quick answer. It works perfect.

    One question more though (or should i open new thred for this?):
    i have a range C4:C50 (range name "one") how can i get that name out in cell C3? Couse i would like to use combo to show (or to pick) nemes of ranges C3:F3 (names: one, two,...)

+ 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