+ Reply to Thread
Results 1 to 2 of 2

Summing a range of numeric values in the left-most character of text cells?

  1. #1
    Registered User
    Join Date
    08-25-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    38

    Summing a range of numeric values in the left-most character of text cells?

    I created a survey on Google Documents where people rate several items from 1-5. (I export the Google Docs results as an Excel file)

    Unfortunately, Google Docs results include the text description in each cell, not just the numeric response: so the cells say "5 - Excellent" "3 - Satisfactory," etc. instead of just the numbers.

    I know that I can get to just the numbers by
    a.) Find & Replace to strip the text out OR
    b.) Creating a duplicate table referring to each cell with "=VALUE(LEFT(F1,1))"

    However, I will be updating this document regularly and I would prefer to sum directly from the original spreadsheet (downloaded as an Excel file) -- it would be tedious and error-prone to fiddle with option a or b.

    Is there a way to sum the numbers directly from these cells?

    I am able to add individual cells with a + operator like this:
    Please Login or Register  to view this content.
    But trying to do the same with a range was unsuccessful:

    Please Login or Register  to view this content.
    [resulted in error]

    Is it possible to do this somehow?

    Thanks

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summing a range of numeric values in the left-most character of text cells?

    try

    =SUMPRODUCT(--(LEFT(F1:F20,FIND("-",F1:F20)-1)))

    If it is always one digit to sum...

    =SUMPRODUCT(--(LEFT(F1:F20)))

    or if max 2 digits... and there is a space after the number..

    =SUMPRODUCT(--(LEFT(F1:F20,2)))
    Last edited by NBVC; 11-03-2011 at 11:45 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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