+ Reply to Thread
Results 1 to 7 of 7

Find text (multiple) in worksheet and return sum of values in adjacent cell.

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2011
    Posts
    9

    Find text (multiple) in worksheet and return sum of values in adjacent cell.

    I'm trying to create a worksheet that will search the bill of materials list for a number of different parts that share common materials and return the sum of their usage in the adjacent cell.

    Worksheet 1

    Widget 1
    Material Type: Qty:
    Material A 2
    Material B 1


    Widget 2
    Material Type: Qty:
    Material A 1
    Material B 2


    I wish to query all of worksheet 1 for "Material A", and sum all return values one cell to the right. In the above example, this would equal 3.

    Thanks.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find text (multiple) in worksheet and return sum of values in adjacent cell.

    Something like:

    =SUMIF(A:A,D1,B:B)

    Where D1 = Material A
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find text (multiple) in worksheet and return sum of values in adjacent cell.

    For some reason this thread is not showing up in my Subscribed Threads folder.

    I'm posting this reply to see if it causes an update.

    EDIT: this post has caused an update!
    Last edited by Tony Valko; 03-06-2013 at 12:52 PM.

  4. #4
    Registered User
    Join Date
    05-30-2012
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: Find text (multiple) in worksheet and return sum of values in adjacent cell.

    Tony,

    Yes, except the return values you stated as 'B:B', need to return the value from one cell to the right of the matched cell in the range.
    Example:

    Cell B7 = "Material A"
    Cell C17 = "Material A"
    Cell E1 = "Material A"

    I would like a formula:
    =SUMIF(A:ZZ,"Material A,XXXXXX)

    XXXXXX = "cell to the right of a matched value", in the above example, C7+D17+E2

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find text (multiple) in worksheet and return sum of values in adjacent cell.

    So, "Material A" could be in random locations?

    Can you post a SMALL sample file and let us know what result you you expect?

  6. #6
    Registered User
    Join Date
    05-30-2012
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: Find text (multiple) in worksheet and return sum of values in adjacent cell.

    Yes, Material A can be in random locations. Attached is a modified version of a sample I found on this forum. Stumped on the summation portion.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find text (multiple) in worksheet and return sum of values in adjacent cell.

    Based on the layout of the sample file:

    =SUMIF(B7:F9,D2,C7:G9)

    Note how the range references are offset.

+ 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