+ Reply to Thread
Results 1 to 12 of 12

SUMIF Query: How to summarise values based on data extracted from a text string

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    SUMIF Query: How to summarise values based on data extracted from a text string

    Hi,

    I'm assuming this is a SUMIF query. All I want to do is summarise the sales values by the Bxxx code.

    Cheers,

    Snook
    Attached Files Attached Files
    Last edited by The_Snook; 07-17-2013 at 10:03 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    Yep:

    =SUMIF($B$3:$B$28,"*"&E3,$C$3:$C$28)


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    Try SumProduct.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    Perhaps in F3 and copy down.

    =SUMPRODUCT((RIGHT(B3,4)=E3)*($C$3:$C$28))


    Edit: Even that problem is solved by excellent way from TMS, of course is my bad and i meaned..

    =SUMPRODUCT((RIGHT(B3:B28,4)=E3)*($C$3:$C$28))
    Last edited by Fotis1991; 07-17-2013 at 07:31 AM. Reason: Edit
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    @Fotis: maybe ...

    =SUMPRODUCT((RIGHT($B$3:$B$28,4)=$E3)*($C$3:$C$28)) if it is to be dragged down


    Regards, TMS

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    Ha ha. Thank you Trevor! I don't like Dollars.. That's why..I prefer Euros!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    That's why..I prefer Euros!

    Never thought I'd hear a Greek saying that


    Regards, TMS

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    I know that sounds weird .. but the comparison is between the dollar and Euro.

    So if i had only these 2 choices i would prefer Euro and not Dollar!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    Fair enough

  10. #10
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    Sweet solutions all round, thanks!

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    You're welcome. Thanks for the rep.

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: SUMIF Query: How to summarise values based on data extracted from a text string

    You are welcome. Thanks for the rep!

    I would like to say that as you have an excellent solution using SUMIF, it's better to avoid the SUMPRODUCT.

+ 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: 4
    Last Post: 06-10-2013, 09:39 AM
  2. [SOLVED] Time values from extracted text strings
    By Steve Roth in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-08-2012, 01:39 PM
  3. Replies: 7
    Last Post: 08-25-2012, 12:53 PM
  4. Multiple sumif or if to find data based on many values.
    By culverhr in forum Excel General
    Replies: 4
    Last Post: 04-19-2012, 01:29 PM
  5. Summarise data from multiple sheets based on dates
    By tanktata in forum Excel General
    Replies: 4
    Last Post: 02-21-2012, 02:54 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