+ Reply to Thread
Results 1 to 5 of 5

Sum If Function

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Sum If Function

    Normally with the Sum If function you have the Sum column and the criteria column. For instance you want to average all the money made for Angelica: The name Angelica might be in Column A and the money in Column B. For my problem, however, I have them in the same cell. For instance, the cell reads---- "Angelica - $405".

    How can I set a function to Sum all the cells that begin with "Angelica"?

  2. #2
    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
    52,933

    Re: Sum If Function

    short answer...you cant, not with just 1 formula. You will have to extract the value 1st, into another cell, and then you can use sumif() with a wild card
    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

  3. #3
    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: Sum If Function

    sIMPLEST WAY IS TO USE TEXT TO COLUMNS, and split text and numbers in 2 different columns.

    You can hide these 2 columns. Then use a SUMIF dunction.
    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.

  4. #4
    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,440

    Re: Sum If Function

    Assuming that your text values were in column A from row 2 to row 7, a very specific solution for Angelica is:

    =SUMPRODUCT(--(LEFT($A$2:$A$7,LEN("Angelica"))="Angelica"),--(MID($A$2:$A$7,FIND("$",$A$2:$A$7)+1,15)))

    If you were to generalise it and put the name in cell B6, then this could be written:

    =SUMPRODUCT(--(LEFT($A$2:$A$7,LEN(B6))=B6),--(MID($A$2:$A$7,FIND("$",$A$2:$A$7)+1,15)))


    You will need to adjust the range to meet your requirements.

    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


  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,440

    Re: Sum If Function

    @FDibbins: never say "can't" ... it might be get caught in the naughty word censor

    Regards, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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