+ Reply to Thread
Results 1 to 5 of 5

sum, if column contains array of specific strings

  1. #1
    Registered User
    Join Date
    05-22-2019
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    9

    sum, if column contains array of specific strings

    Dear Forum,

    I have the following issue: I want to test whether the letters in Column A are also in Column C (refer to the table below). If so, sum the values in Column B that are associated with Column A. In the example below this should return 2, since from column A only the letters F and G also occur in Column C and F is associated with 2 and G with 0. I tried {=SUMIF(A2:A5;C2:C4;B2:B5)}, which returns the false value 0 since the the Fs in Columns A and C are not in the same row (and I cannot change the dataset to make this the case).
    Do you know any formula that can do this operation?

    Any help is very much appreciated.

    Best regards,
    Mag2

    A B C
    1 letters to be tested values associated with ColA letters to be tested against
    2 F 2 X
    3 G F
    4 H 3 G
    5 I
    Last edited by Mag2; 06-02-2019 at 04:46 AM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,069

    Re: sum, if column contains array of specific strings

    Hi & welcome to the board.
    How about
    =SUMPRODUCT(--(ISNUMBER(MATCH(A2:A5,C2:C5,0))),B2:B5)

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: sum, if column contains array of specific strings

    Another way

    =SUMPRODUCT(SUMIF(A2:A5,C2:C4,B2:B5))

  4. #4
    Registered User
    Join Date
    05-22-2019
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    9

    Re: sum, if column contains array of specific strings

    Hi both,

    yes, that works perfectly fine! Thank you very much for your prompt reply and help!

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,069

    Re: sum, if column contains array of specific strings

    You're welcome & thanks for the feedback

+ 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] Array of lookups returning multiple strings if last two strings are empty
    By chriskay in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-14-2019, 07:35 AM
  2. Match different long strings with an array of short, summarizing strings
    By FKemps in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-24-2015, 12:55 AM
  3. How to count occurrence of strings from array (row) in a column
    By oshikawa1140 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2015, 11:05 AM
  4. [SOLVED] How to identifying specific strings in a column?
    By GIS2013 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-10-2013, 07:36 AM
  5. Help searching an array of text strings for common strings
    By ABComp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-23-2012, 11:19 PM
  6. Replies: 9
    Last Post: 12-21-2012, 04:18 AM
  7. Parse array of strings to compare/validate against specific format
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-19-2012, 02:01 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