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.

想和在th细胞与数字和文本em 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

  • Hi Dan,

    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,

    when creating a task list I normally 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.

    I'm looking to 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.
The move row automation will move all children underneath of a parent row if just the parent row is what triggers the automation.<\/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":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"},{"tagID":334,"urlcode":"automations","name":"Automations"}]},{"discussionID":108818,"type":"question","name":"Convert the text \"yesterday\" to a date format.","excerpt":"I downloaded some issues from Jira and I have a column from there titled \"Last Updated\". In that column it has the regular date format but also text that reads \"Yesterday\" or \"Today\". I figured I could use the TODAY() formula to convert the today dates, but how do I configure that to convert to yesterday? Is it TODAY(-1)?…","snippet":"I downloaded some issues from Jira and I have a column from there titled \"Last Updated\". In that column it has the regular date format but also text that reads \"Yesterday\" or…","categoryID":322,"dateInserted":"2023-08-10T19:51:48+00:00","dateUpdated":"2023-08-11T08:46:44+00:00","dateLastComment":"2023-08-11T12:39:47+00:00","insertUserID":164799,"insertUser":{"userID":164799,"name":"JacksonElla","title":"Senior PM","url":"https:\/\/community.smartsheet.com\/profile\/JacksonElla","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T16:31:43+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":164799,"lastUser":{"userID":164799,"name":"JacksonElla","title":"Senior PM","url":"https:\/\/community.smartsheet.com\/profile\/JacksonElla","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T16:31:43+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":25,"score":null,"hot":3383455895,"url":"https:\/\/community.smartsheet.com\/discussion\/108818\/convert-the-text-yesterday-to-a-date-format","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108818\/convert-the-text-yesterday-to-a-date-format","format":"Rich","lastPost":{"discussionID":108818,"commentID":390177,"name":"Re: Convert the text \"yesterday\" to a date format.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/390177#Comment_390177","dateInserted":"2023-08-11T12:39:47+00:00","insertUserID":164799,"insertUser":{"userID":164799,"name":"JacksonElla","title":"Senior PM","url":"https:\/\/community.smartsheet.com\/profile\/JacksonElla","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-11T16:31:43+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-11T12:39:13+00:00","dateAnswered":"2023-08-11T10:36:04+00:00","acceptedAnswers":[{"commentID":390167,"body":"

Hi @JacksonElla<\/a>,<\/p>

If \"Yesterday\" and \"Today\" are the only text values you end up with, then this formula would do what you're after:<\/p>

=IF([Last Updated]@row = \"Yesterday\", TODAY(-1), IF([Last Updated]@row = \"Today\", TODAY(), [Last Updated]@row))<\/p>

Ironically, typing Yesterday\/Today directly into a date column in Smartsheet will give the relevant date (as will last\/previous\/next <insert day>) but I don't know if the Jira integration would support that or you'd need to use a helper column with the formula as above.<\/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":[]},{"discussionID":108822,"type":"question","name":"Activity Log | Rows Deleted Filter","excerpt":"I've got a conundrum on my hands where a record has gone missing. In the Activity Log, I'm able to find the record of when it was created. However, there is nothing I'm seeing indicating that it was deleted (even though the Activity Log doesn't have a specific filter for this, I traced through the log for the past 11 days…","snippet":"I've got a conundrum on my hands where a record has gone missing. In the Activity Log, I'm able to find the record of when it was created. However, there is nothing I'm seeing…","categoryID":321,"dateInserted":"2023-08-10T21:46:08+00:00","dateUpdated":null,"dateLastComment":"2023-08-10T22:01:16+00:00","insertUserID":121055,"insertUser":{"userID":121055,"name":"Jake Gustafson","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Jake%20Gustafson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!-lnW91tuGTw!bO9UmyNQSXQ!WUYBUm0HF6t","dateLastActive":"2023-08-11T14:43:21+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"updateUserID":null,"lastUserID":121055,"lastUser":{"userID":121055,"name":"Jake Gustafson","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Jake%20Gustafson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!-lnW91tuGTw!bO9UmyNQSXQ!WUYBUm0HF6t","dateLastActive":"2023-08-11T14:43:21+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":31,"score":null,"hot":3383410044,"url":"https:\/\/community.smartsheet.com\/discussion\/108822\/activity-log-rows-deleted-filter","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108822\/activity-log-rows-deleted-filter","format":"Rich","tagIDs":[447],"lastPost":{"discussionID":108822,"commentID":390131,"name":"Re: Activity Log | Rows Deleted Filter","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/390131#Comment_390131","dateInserted":"2023-08-10T22:01:16+00:00","insertUserID":121055,"insertUser":{"userID":121055,"name":"Jake Gustafson","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Jake%20Gustafson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!-lnW91tuGTw!bO9UmyNQSXQ!WUYBUm0HF6t","dateLastActive":"2023-08-11T14:43:21+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":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/SIFFD1TSN3Q6\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-10T22:01:20+00:00","dateAnswered":"2023-08-10T22:01:16+00:00","acceptedAnswers":[{"commentID":390131,"body":"

Ok, I found it. Classic case of submit something for help, then find the answer. I think what may have happened previously, is that I turned on all the filters, but since there isn't one for a Deleted Row, maybe the Deleted Row was hidden. When I came back, I didn't click anything on the filters for the Activity Log and when scrolling through looking for the 'magic' delete word, I found the record I was looking for.<\/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":[{"tagID":447,"urlcode":"activity-log","name":"Activity Log"}]}],"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