+ Reply to Thread
Results 1 to 6 of 6

SumProdect with Text & Ints

  1. #1
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    SumProdect with Text & Ints

    I had a thread here:
    http://www.excelforum.com/excel-form...ml#post4256719

    and both
    @oeldere
    @bebo021999

    Helped me out greatly on that one! But now that I have gotten the actual workbook there are a few text values input (they are not blank like originally thought), so the SUMPRODUCT() formula throws an error.

    So same criteria....and desired output...
    All worksheet holds the data
    C2:EF2 is the header row where the text woudl be "Shirts Ordered This Week"
    MATCH(A2) student name text to match-up on All worksheet
    ALL!$A:$A houses the entire student list (so match A2 from above)

    if someone wouldGarbageWorkbook.xlsx again be so kind to assist.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SumProdect with Text & Ints

    Try

    =SUMIF(All!$C$2:$R$2,$I$1,INDEX(All!$C$3:$R$14,MATCH(A2,All!$A$3:$A$14,0),0))

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: SumProdect with Text & Ints

    Using your posted workbook...
    this formula returns the total "shirts ordered this week" for the referenced name
    Please Login or Register  to view this content.
    Copy that formula down through L13.

    EDITED TO INCLUDE THIS VARIATION:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Last edited by Ron Coderre; 12-09-2015 at 02:32 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,675

    Re: SumProdect with Text & Ints

    Use this instead:

    =SUM((All!$A$3:$A$14=Totals!$A2)*(All!$C$2:$R$2=Totals!I$1)*IFERROR(--All!$C$3:$R$14,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Quang PT

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,675

    Re: SumProdect with Text & Ints

    Thanks Ron, a magic sumproduct!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: SumProdect with Text & Ints

    I had worked on this (and got called away), so I am posting my version anyway (pretty much the same as Ron's...
    =SUMPRODUCT((All!$A$3:$A$14=Totals!$A2)*(All!$C$2:$R$2=Totals!I$1),All!$C$3:$R$14)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. VBA: Wrapping text and transversing text between nubers or given speific text
    By sroysroy in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-08-2015, 07:52 PM
  2. [SOLVED] How to match a cell with text with a range of text and return own text
    By ec4excel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2014, 11:07 AM
  3. [SOLVED] Need to Mod Code on red text, I have VBA to distinguish Paid(Black Text) Unpaid(Red Text)
    By Garbology in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-11-2014, 07:55 PM
  4. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  5. Replies: 0
    Last Post: 04-22-2013, 12:13 PM
  6. Macro to Parse Text - Import text to Excel from Multiple Text Files & Folders
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:05 AM
  7. [SOLVED] Use .text from previous text box in form to prefill text in second text box
    By chromachem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2012, 10:04 PM

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