Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, pleaseVisit the Current Forums.

How to Sum Cells with Numbers & Text

Dereck H
Dereck H
edited 12/09/19 inArchived 2017 Posts

Have a super basic question I just can't seem to find a quick answer for.

Want to sum cells with both numbers and text in them like "15 min" + "15 min" and get the result of "30 min". I formatted the cell with the following formula:

=15 + " min"

Result: 15 min

When I add 2 cells with that formula [=15 + " min"] + [=15 + " min"], the result is 0. How do I tell smartsheet to ignore the text string and focus on summing the numeric value only?

«1

Comments

  • I would suggest you separate the numbers and the units. This will make your calculations and data entry much easier. See screen shot included. I've used =sum(children()) in the parent row to total the time.

    Shawn

    Screen Shot.JPG

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭

    I second Shawn's solution. I don't believe that summing text columns is possible. At least, not without some kind of fancy dissecting of the cells.

  • Thank you for the feedback guys, just wanted to confirm and see if there was a way to get the formatting I was looking for without haveing to add a separate column. If anyone is aware of a "fancy" formula workout, I'm all eyes & ears.

  • If there is always only 1 space in the text, and the duration is always in minutes, and the answer is in minutes, you can find the cell number value like this:

    =VALUE(LEFT(Duration1,FIND(Duration1," ")-1))

    If you have varying hours, minutes, second, hours entries, you can pull out the units with this:

    =RIGHT(Duration1,LEN(Duration1)-FIND(Duration1," "))

    Does that set you in the right direction?

    Jim

  • Jim,

    We're looking for a formula in a cell to sum the number in 2 parent cells where we have text and numbers in the same cells as a result of a formula. Currently, we're trying to a workaround of SUMIF & IS NUMBER, but that does not seem to work. I've uploaded an example, AO is Approved Opportunities, we're trying to sum the Active & Inactive Approved Opportunities to have a total number of Approved Opportunities we've processed. Here's what we have now...... ="Approved Opportunities" + SUMIF([DCAPS Opportunities]50:[DCAPS Opportunities]61, ISNUMBER))

    Any insight would be great!

    Dan

    SmartSheet Community Inquirey.png

  • 嗨,丹,

    It seems like you'll need to add a column for ISNUMBER in your sheet, because it won't accept a range and does require parameters. So adding the column (NumYesNo, for example) would allow you to do this:

    ="Approved Opportunities" + SUMIF([NumYesNo]50:[NumYesNo]61,TRUE,[DCAPS Opportunities]50:[DCAPS Opportunities]61)

    Effectively, the third SUMIF parameter indicates the range from which the values should be pulled, but only if they are numbers based on the value in the NumYesNo column.

    Then, in your NumYesNo column on row 50, use the formula

    =ISNUMBER([DCAPS Opportunities]50)

    Repeat this through to 61.

    Let me know how it goes.

  • Thanks Jim,

    I've moved around a few rows and cells, but still have same structure. Whereas "Approved Opportunities" is now "Pipeline Summary"

    ="Pipeline Summary" + SUMIF([NumYesNo]11:[NumYesNo]15,TRUE,[DCAPS Opportunities]11:[DCAPS Opportunities]15)

    I'm getting an #INVALID COLUMN VALUE return on the NumYesNo column cell.

    Please see attached.

    I've tried using the sumif & range replaced by children..but no result.

    Thoughts?

    Thanks,

    Dan

    Image SmartSheet Formula.png

  • Sorry, I just checked and got the same result. Try making the NumYesNo column a checkbox column and see if that works.

  • J. Craig Williams
    J. Craig Williams ✭✭✭✭✭✭
    edited 01/30/18

    Can you clarify what you are trying to do? Are you trying to COUNT or SUM the results?

    This might be what you are looking for:

    ="A" + COUNTIFS([YOURCOLUMNNAME]41:[YOURCOLUMNNAME]50, ISNUMBER(@cell))

    for rows 41 to 50.

    Craig

    (Note: I used COUNTIFS instead of COUNTIF out of habit)

  • Craig,

    Trying to SUM the results of the children.

    Would SUMIF work? And would I have to separate the numbers within the cell from any text or characters?

    Thanks,

    Dan

  • J. Craig Williams
    J. Craig Williams ✭✭✭✭✭✭

    Are you trying to SUM the results in the () of the children?

    How do you get the numbers in the ()?

    I assumed your were trying to reproduce a sum of those numbers in the () and those were counts

    Craig

  • Jim,

    That doesn't seem to work.

    ="Pipeline Summary" + SUMIF(NumYesNo9:NumYesNo14, 1, [DCAPS Opportunities]9:[DCAPS Opportunities]14)

    Returns. Pipeline Summary 0

    Thanks,

    Dan

  • I'm trying to do something similar,

    在创建任务列表我规范ally use the "Project" option as it's easier to link impact from multiple sheets when estimated duration and seeing change impact.

    I'm also creating new start and finish columns because I can apply formulas to them which I can't do within the standard "Project" sheet.

    我想remove the d from the duration columns examples

    Task name abc - Duration 1d

    Task name acb - Duration 12d

    What I'm looking to do is add the duration to the new Finish column. I need to remove the d to achieve this any tips would be great

  • I ended up creating a new column to provide just the number using the following formula

    =SUBSTITUTE(Duration6, "d", "", 1)

  • Going back to the post on "How to Sum Cells with Numbers & Text" from May 22, 2017 - I am trying to do something similar where I have text and numbers in the same cell but would like to sum up the numbers only in the total column. Is there a way to sum up numbers while ignoring the text?

    Thank you!

This discussion has been closed.
\n \n https:\/\/community.smartsheet.com\/discussion\/108880\/recover-a-row-that-was-accidentally-moved-then-deleted\n <\/a>\n<\/div>\n

Hey @GlennJo<\/a>,<\/p>

the sheet should be available in the owner of the sheet, deleted files. If it is specifically a row of data that was deleted, you can try checking the activity log to see if it shows the removed data there.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":108840,"type":"question","name":"WorkApps - Admin Permissions on Assets","excerpt":"Hi, We are using WorkApps more and more to create a \"one-stop shop\" where users can go to access forms, sheets, reports, dashboards & dynamic views. Some users have admin access to sheets, and we lock certain columns to ensure that editors can only amend specific information. However, when sheet admins use WorkApps then…","snippet":"Hi, We are using WorkApps more and more to create a \"one-stop shop\" where users can go to access forms, sheets, reports, dashboards & dynamic views. Some users have admin access…","categoryID":343,"dateInserted":"2023-08-11T03:12:23+00:00","dateUpdated":"2023-08-11T08:46:32+00:00","dateLastComment":"2023-08-12T15:07:07+00:00","insertUserID":125212,"insertUser":{"userID":125212,"name":"Neil Watson","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Neil%20Watson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!pglbKXXltro!HIFbX6W_ivo!Lnqe5-nvNY5","dateLastActive":"2023-08-12T14:37:50+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":91566,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-12T15:58:32+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":24,"score":null,"hot":3383578170,"url":"https:\/\/community.smartsheet.com\/discussion\/108840\/workapps-admin-permissions-on-assets","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108840\/workapps-admin-permissions-on-assets","format":"Rich","lastPost":{"discussionID":108840,"commentID":390361,"name":"Re: WorkApps - Admin Permissions on Assets","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/390361#Comment_390361","dateInserted":"2023-08-12T15:07:07+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-12T15:58:32+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Add Ons and Integrations","url":"https:\/\/community.smartsheet.com\/categories\/apps-and-integrations"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-11T23:36:29+00:00","dateAnswered":"2023-08-11T18:10:14+00:00","acceptedAnswers":[{"commentID":390276,"body":"

Sounds about right. Are you looking for some kind of guidance on a specific issue?<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":343,"name":"Add Ons and Integrations","url":"https:\/\/community.smartsheet.com\/categories\/apps-and-integrations","allowedDiscussionTypes":["discussion","question"]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":108864,"type":"question","name":"Is there a formula to show as %","excerpt":"What I am trying to do is have my overview brought in automatically each month so it doesn't have to manually be typed in. The struggle I'm having is it wants to bring in as a decimal instead of a %. Below is the formula I am currently using. Is there a way to make it show as % =\"We are at \" + [% closed rate]@row + \"…","snippet":"What I am trying to do is have my overview brought in automatically each month so it doesn't have to manually be typed in. The struggle I'm having is it wants to bring in as a…","categoryID":322,"dateInserted":"2023-08-11T17:22:21+00:00","dateUpdated":null,"dateLastComment":"2023-08-11T19:29:15+00:00","insertUserID":144360,"insertUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T20:24:30+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":144360,"lastUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T20:24:30+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":34,"score":null,"hot":3383558496,"url":"https:\/\/community.smartsheet.com\/discussion\/108864\/is-there-a-formula-to-show-as","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108864\/is-there-a-formula-to-show-as","format":"Rich","lastPost":{"discussionID":108864,"commentID":390301,"name":"Re: Is there a formula to show as %","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/390301#Comment_390301","dateInserted":"2023-08-11T19:29:15+00:00","insertUserID":144360,"insertUser":{"userID":144360,"name":"Hollie Green","url":"https:\/\/community.smartsheet.com\/profile\/Hollie%20Green","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T20:24:30+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-11T19:29:56+00:00","dateAnswered":"2023-08-11T17:49:58+00:00","acceptedAnswers":[{"commentID":390269,"body":"

Try this - =\"We are at \" + [% closed rate]@row * 100 + \"% closed rate on ticket status for the month of \"+[Month]@row.<\/p>"},{"commentID":390301,"body":"

I figured it out! Updated formula to get the 2 decimal places as well.<\/p>

=\"We are at \" + IFERROR(ROUND([% closed rate]@row * 100, 2), \"//www.santa-greenland.com/community/discussion/comment/26281/\") + \"% closed rate on ticket status for the month of \" + Month@row<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&siteSectionID=0&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending Posts","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending Posts