+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Extract add numbers from text w/blank cells

  1. #1
    Registered User
    Join Date
    05-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    14

    Smile Extract add numbers from text w/blank cells

    Hi all,

    I hope someone can help on this one. I am sooo stumped.

    I have one column with numbers as text on the left and right separated by "..", i.e.,

    4.56..12.01
    9.12..0.34
    11.67..5.46

    This is data that was stored in this fashion and I don't know why. I have about 1500 of these in one column.

    I need to add the left-most numbers and the right-most numbers and then a total. Attached please find a sample workbook.

    If possible I would really appreciate a formula that can add the numbers on the left and another formula to add the numbers on the right.

    Thank you in advance for helping with or just reading this post.
    Attached Files Attached Files
    Last edited by luix; 10-21-2011 at 01:13 PM. Reason: SOLVED

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Extract and add numbers from text

    I have made left side (You can figure out the right side in similar way)

    ok. with right side was worst but it works
    Attached Files Attached Files
    Last edited by tom1977; 10-21-2011 at 03:14 AM.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

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

    Re: Extract and add numbers from text

    Please Login or Register  to view this content.
    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

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Extract and add numbers from text

    Use two helper columns say D and E

    In D enter
    Please Login or Register  to view this content.
    and pull down as needed
    In E enter
    Please Login or Register  to view this content.
    and pull down

    You can combine in one column if you like
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Extract and add numbers from text

    Thank you all... but alas not solved yet since I was aiming at not having to use helper columns -see original post.

    Tom1977 gave it a good try but the all the formulas in the workbook return a #VALUE error.

    I will fiddle around with the formulas therein to see if I can eliminate the errors.

    If someone can point me in the right direction of a starting formula I'd appreciate it.

    Thanks again!

    Luix
    Last edited by luix; 10-21-2011 at 11:53 AM.

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Extract and add numbers from text

    since I was aiming at not having to use helper columns -see original post
    .

    Does the attached help? ( to me col D and E are helper columns)
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Extract and add numbers from text

    How about, for the left side:

    =SUM(INDEX(VALUE(LEFT(B1:B19,FIND("..",B1:B19)-1)),0))

    And for the right side

    =SUM(INDEX(VALUE(MID(B1:B19,FIND("..",B1:B19)+2,255)),0))

  8. #8
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Extract and add numbers from text

    Luix
    Did You accepted my formulas by CTRL+SHIFT+ENTER?(without this always will be error) I have used array formulas
    Attached Files Attached Files
    Last edited by tom1977; 10-21-2011 at 12:55 PM.

  9. #9
    Registered User
    Join Date
    05-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    14

    Talking Re: Extract and add numbers from text

    Thank you all. Everyone contributed significantly. All getting nice ratings from me
    This one is solved!

    Thank you Andrew-R, you hit the mark!
    Thank you arthurbr but my intent was
    not having to use helper columns
    Thank you Tom1977 but the array formulas did not work for some reason.
    Thank you vlady who always has a watchful eye!

    For the sake of being thorough I will add to Andrew-R's solution with the following ARRAY formulas that also do the job:

    Left side numbers added:
    =SUM(VALUE(SUBSTITUTE(B1:B19,RIGHT(B1:B19,LEN(B1:B19)-FIND("..",B1:B19)+1),"")))
    Right side numbers added:
    =SUM(VALUE(SUBSTITUTE(B1:B19,LEFT(B1:B19,FIND("..",B1:B19)+1),"")))
    To add both left and right numbers just put both formulas in a cell with a + between them.

    Have a great weekend buds!

  10. #10
    Registered User
    Join Date
    05-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Extract and add numbers from text

    Just realized there are some blank cells in my actual column. So the formulas return a #VALUE error when they encounter a blank.

    The following ARRAY formulas correct that problem:

    =SUM(IF(ISNUMBER(SEARCH("..",B1:B19)),SUBSTITUTE(B1:B19,RIGHT(B1:B19,LEN(B1:B19)-FIND("..",B1:B19)+1),"")+0))
    =SUM(IF(ISNUMBER(SEARCH("..",B1:B19)),SUBSTITUTE(B1:B19,LEFT(B1:B19,FIND("..",B1:B19)+1),"")+0))
    Attached Files Attached Files
    Last edited by luix; 10-21-2011 at 02:11 PM. Reason: upload example

+ 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