+ Reply to Thread
Results 1 to 10 of 10

SUMPRODUCT when cell contains letter

  1. #1
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    SUMPRODUCT when cell contains letter

    I am using a SUMPRODUCT to look through an expanding set of data on another sheet and based off the criteria sum the data.

    When the criteria is a fixed number such as 921 or 889 it works great. SUMPRODUCT(--('GL3001'!C:C="921")) that works.

    However I have a large section of data that the criteria begins with a letter. So it can be R5500 , R651000 , R31
    I am trying to figure out how to include all the data that begins with that Letter.

    I looked through the forum and tried the following;

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    It returns a #Value, I believe because it isn't a number and is returning zero...

    The rest of the arrays are working fine, just filtering that first one to include all data that begins with R.

    Any guidance would be appreciated.

    Thanks!
    Last edited by thisiscrazy; 03-24-2016 at 11:17 AM.

  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: SUMPRODUCT when cell contains letter

    Post a SMALL sample file with about 20 rows worth of data and tell/show us what result you expect.

    A SMALL file with about 20 rows worth of data will be about 10kb in size.

    We only need to see data that is relevant to the problem.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: SUMPRODUCT when cell contains letter

    Attached is a sample file.
    The current formula on Sheet2 works to sum all the data it is asking for, I'd like it to sum all the data in column I that corresponds to items in
    column C that begin with the letter R. So I am looking for the 9,437,987.93 instead of just the 140 from R1100

    Also, I'm not sure why the file is 23kb. it is two worksheets?
    Attached Files Attached Files

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

    Re: SUMPRODUCT when cell contains letter

    This works for me:

    =SUMIF(Sheet1!C:C,"R*",Sheet1!I:I)

  5. #5
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: SUMPRODUCT when cell contains letter

    Try this:
    =SUMIFS(Sheet1!I:I,Sheet1!C:C,"R*",Sheet1!M:M,"ST")
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  6. #6
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: SUMPRODUCT when cell contains letter

    Thanks! They both work great. And are a more elegant solution.

    I do need the secondary check for ST.

    I tried using the wildcard with Sumproduct, but I couldn't get it to work.

    Would you mind explaining what the subtotal offset part of my original formula is doing?
    If it isn't necessary, I think excel would run faster if I removed all the array formulas and replaced them with one of these.

    Thanks again!
    Last edited by thisiscrazy; 03-24-2016 at 11:28 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: SUMPRODUCT when cell contains letter

    I can't really follow the SUBTOTAL part of your formula either. Maybe somebody else can help.

    Array formulas, including SUMPRODUCT formulas, are slow, in my experience, when you use entire rows or columns. Try specifying a smaller range.

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

    Re: SUMPRODUCT when cell contains letter

    The SUMPRODUCT function doesn't accept wildcards.

    The SUBTOTAL syntax is typically used on filtered data. You didn't have any filters applied in your sample file so I assume you don't need the SUBTOTAL syntax.

  9. #9
    Registered User
    Join Date
    04-17-2009
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2011
    Posts
    30

    Re: SUMPRODUCT when cell contains letter

    Thanks again! I need to include the entire column as each month the data set will grow. It is currently at 55k rows at only three months. I'm actually not sure how big it will get. Around 220k I guess.

    The filtering requirement makes sense. The spreadsheet I modeled this off of they would filter over and over.
    So, I will remove that syntax.

    Thanks again!

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

    Re: SUMPRODUCT when cell contains letter

    You're welcome!

+ 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. Replies: 6
    Last Post: 03-30-2016, 04:28 PM
  2. [SOLVED] SUMPRODUCT - Letter by Date range by Cell Value
    By Matt1998 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-21-2015, 11:13 AM
  3. Replies: 25
    Last Post: 04-21-2015, 10:19 AM
  4. [SOLVED] formula sumproduct with criteria any letter at "end" of a number
    By nd4spd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2013, 08:46 AM
  5. Replies: 2
    Last Post: 07-26-2005, 03:05 AM
  6. Replies: 2
    Last Post: 05-09-2005, 04:06 PM
  7. if a cell = a particular letter or even contains that letter
    By Brian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-28-2005, 02:07 AM

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