+ Reply to Thread
Results 1 to 8 of 8

Sumproduct for numbers within a text

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    Sumproduct for numbers within a text

    Can anyone help me to use Sumproduct for the following?

    Col1 Col2
    5 1 mL
    4 1.5 mL
    5 2.5 mL
    7 2 mL
    2 1.5 mL

    Thanks.

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

    Re: Sumproduct for numbers within a text

    Try

    =SUMPRODUCT(A2:A6,LEFT(B2:B6,LEN(B2:B6)-3)+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: Sumproduct for numbers within a text

    With your sample data in A1:B6...Headings are in Row_1
    This regular formula multiplies each Col_A value times each Col_B numeric and returns the sum
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Sumproduct for numbers within a text

    Hi, and welcome to the forum,


    =SUM(A2,LEFT(B2,FIND(" ",B2)-1))

    Will this work for you?


    A
    B
    C
    1
    Col1 Col2 Sum
    2
    5
    1 mL
    6
    3
    4
    1.5 mL
    5.5
    4
    5
    2.5 mL
    7.5
    5
    7
    2 mL
    9
    6
    2
    1.5 mL
    3.5
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Sumproduct for numbers within a text

    another way..

    =SUMPRODUCT(A2:A6,SUBSTITUTE(B2:B6,"mL","")*1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Sumproduct for numbers within a text

    You guys are awesome! Thanks All.
    @Jonmo1: Your fomula works, but I do not understand the +0 in it. I would appreciate an explanation.

  7. #7
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Sumproduct for numbers within a text

    @Jonmo1: Nevermind. I think I know why. It's the same kinda trick Ace_XL used in his formula.

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Sumproduct for numbers within a text

    FORUM MODERATOR'S REQUEST:

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ 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. sumproduct of a number array and a text array starting with 2 numbers
    By Bishonen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2013, 11:48 AM
  2. [SOLVED] SumProduct of Arrays that Contain Some Text andSome Numbers
    By Larry.LeBlanc@O in forum Excel General
    Replies: 2
    Last Post: 05-17-2012, 03:51 PM
  3. Replies: 6
    Last Post: 03-09-2011, 08:01 AM
  4. [SOLVED] Sumproduct-My numbers are not matching.
    By Denise in forum Excel General
    Replies: 4
    Last Post: 10-19-2005, 10:05 PM
  5. Does SUMPRODUCT only accept text and numbers?
    By Racorfrank in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-04-2005, 03:19 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