欢迎来到Smartsheet论坛档案


本论坛中的帖子不再被监控准确性,其内容可能不再是最新的。如果这里有您感兴趣的讨论,并且您想找到(或创建)一个更最新的版本,请访问当前论坛。

如何用数字和文本和单元格

Dereck H
编辑12/09/19 2017年帖子

有一个超级基本的问题,我似乎找不到一个快速的答案。

想要将其中包含数字和文本的单元格相加,如“15分钟”+“15分钟”,并得到“30分钟”的结果。我用下面的公式格式化了单元格:

=15 +“min”

结果:15分钟

当我用公式[=15 + " min"] + [=15 + " min"]添加2个单元格时,结果是0。我如何告诉智能表忽略文本字符串,并专注于数字值的总和?

«1

评论

  • 我建议你把数字和单位分开。这将使您的计算和数据输入更容易。见屏幕截图包括。我在父行中使用=sum(children())来计算总时间。

    肖恩

    屏幕Shot.JPG

  • 迈克Wilday
    迈克Wilday ✭✭✭✭✭✭

    我赞同肖恩的解决办法。我认为对文本列求和是不可能的。至少,需要对细胞进行一些精细的解剖。

  • 谢谢大家的反馈,只是想确认一下,看看是否有一种方法可以得到我想要的格式,而不必添加一个单独的列。如果有人知道“花哨的”公式锻炼,我会全神贯注地听着。

  • 如果文本中总是只有1个空格,并且持续时间总是以分钟为单位,并且答案以分钟为单位,您可以像这样找到单元格号的值:

    (左=值(Duration1,找到(Duration1”)1))

    如果你有不同的小时、分钟、秒、小时条目,你可以用这样的方法提取单位:

    =正确(Duration1 LEN (Duration1)找到(Duration1 "))

    这能帮你找到正确的方向吗?

    吉姆

  • 吉姆,

    我们在一个单元格中寻找一个公式来和2个父单元格中的数字,其中我们在相同的单元格中有文本和数字作为公式的结果。目前,我们正在尝试SUMIF & IS NUMBER的解决方案,但这似乎并不奏效。我已经上传了一个例子,AO是批准的机会,我们正在尝试将活跃和不活跃的批准机会相加,以获得我们已经处理的批准机会的总数。这是我们现在拥有的......="已批准的机会" + SUMIF([DCAPS机会]50:[DCAPS机会]61,ISNUMBER))

    任何见解都很棒!

    SmartSheet社区查询。png

  • 嗨,丹,

    似乎需要在工作表中为ISNUMBER添加一列,因为它不接受范围,而且确实需要参数。因此,添加列(NumYesNo,例如)将允许您这样做:

    ="已批准的机会" + SUMIF([NumYesNo]50:[NumYesNo]61,TRUE,[DCAPS机会]50:[DCAPS机会]61)

    实际上,第三个SUMIF参数指示应该从中提取值的范围,但仅当它们是基于NumYesNo列中的值的数字时。

    然后,在第50行的NumYesNo列中,使用公式

    (DCAPS机会)= ISNUMBER (50)

    重复这一步骤直到第61页。

    有什么进展请告诉我。

  • 谢谢你吉姆,

    我已经移动了几行和单元格,但仍然有相同的结构。鉴于“已批准的机会”现在是“管道摘要”

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

    我得到一个#无效的列值返回NumYesNo列单元格。

    请见附件。

    我尝试使用sumif & range替换为child ..但没有结果。

    想法吗?

    谢谢,

    图片SmartSheet Formula.png

  • 对不起,我刚刚检查了一下,得到了同样的结果。尝试将NumYesNo列设置为复选框列,看看是否有效。

  • J.克雷格·威廉姆斯
    J.克雷格·威廉姆斯 ✭✭✭✭✭
    编辑01/30/18

    你能说清楚你想做什么吗?你是在计算结果还是在计算结果?

    这可能就是你想要的:

    =" a " + countifs ([yourcolumnname]41:[yourcolumnname]50, isnumber (@cell))

    第41至50行。

    克雷格

    (注意:出于习惯,我使用了COUNTIFS而不是COUNTIF)

  • 克雷格,

    试着把孩子们的成绩加起来。

    SUMIF有用吗?我是否必须将单元格中的数字与任何文本或字符分开?

    谢谢,

  • 您正在尝试在()中对孩子的结果求和吗?

    如何获得()中的数字?

    我假设您试图在()中重现这些数字的和,这些是计数

    克雷格

  • 吉姆,

    这似乎不管用。

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

    的回报。管道总结0

    谢谢,

  • 我也在尝试做类似的事情,

    在创建任务列表时,我通常使用“项目”选项,因为当估计持续时间和看到变更影响时,更容易从多个表中链接影响。

    我还创建了新的开始和结束列,因为我可以对它们应用公式,这是在标准的“项目”表中无法做到的。

    我正在寻找从持续时间列的例子中删除d

    任务名称abc -持续时间

    任务名称acb -持续时间12d

    我要做的是将持续时间添加到新的Finish列。我需要去掉d来实现这个,任何技巧都很好

  • 最后,我创建了一个新列,使用下面的公式提供数字

    =替换(Duration6, "d", " 1 ")

  • 回到2017年5月22日的“如何用数字和文本求和单元格”的帖子-我试图做一些类似的事情,我在同一个单元格中有文本和数字,但只想在总数列中求和数字。有没有一种方法可以在忽略文本的情况下对数字进行求和?

    谢谢你!

这次讨论已经结束。
My apologies. Wrong function.<\/p>

=IF(AND([Budget Forecast]@row>= 0.90, [Budget Forecast]@row<= 1), \"Green\", IF(AND<\/strong>([Budget Forecast]@row>= 0.80, [Budget Forecast]@row<= 1.03), \"Yellow\", \"Red\"))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-22 08:34:56","updateUser":{"userID":124479,"name":"Helen Coen","url":"https:\/\/community.smartsheet.com\/profile\/Helen%20Coen","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!xRDV8etL72Q!AdtVgBN2zjw!JHhi1z5cfgR","dateLastActive":"2022-12-22T08:33:19+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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":98998,"type":"question","name":"Using result from one check box to check another box","excerpt":"The trigger box is a checkmark, the receiving box is a star. I'm using this formula: =IF ([ShipC Updated]@row = 1), 1 The column name is ShipC Updated, the column I'm putting the formula in is Complete (has the star). I'm getting #Unparsable errors regardless of what I try! Please help!! Snip of spreadsheet below. Both…","categoryID":322,"dateInserted":"2022-12-21T18:39:51+00:00","dateUpdated":null,"dateLastComment":"2022-12-21T20:15:00+00:00","insertUserID":156200,"insertUser":{"userID":156200,"name":"ReneeW","url":"https:\/\/community.smartsheet.com\/profile\/ReneeW","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T20:54:14+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":156200,"lastUser":{"userID":156200,"name":"ReneeW","url":"https:\/\/community.smartsheet.com\/profile\/ReneeW","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T20:54:14+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":8,"countViews":43,"score":null,"hot":3343306491,"url":"https:\/\/community.smartsheet.com\/discussion\/98998\/using-result-from-one-check-box-to-check-another-box","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98998\/using-result-from-one-check-box-to-check-another-box","format":"Rich","lastPost":{"discussionID":98998,"commentID":355147,"name":"Re: Using result from one check box to check another box","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/355147#Comment_355147","dateInserted":"2022-12-21T20:15:00+00:00","insertUserID":156200,"insertUser":{"userID":156200,"name":"ReneeW","url":"https:\/\/community.smartsheet.com\/profile\/ReneeW","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T20:54:14+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/R9AMERP2LMMH\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-12-21T19:45:29+00:00","dateAnswered":"2022-12-21T18:58:49+00:00","acceptedAnswers":[{"commentID":355126,"body":"

Hi @ReneeW<\/a> <\/p>

I hope you're well and safe!<\/p>

Try something like this.<\/p>

=IF([ShipC Updated]@row = 1, 1)<\/p>

Did that work\/help? <\/p>

I hope that helps!<\/p>

Have a fantastic week & Happy Holidays!<\/p>

Best,<\/p>

Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p>

Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"},{"commentID":355142,"body":"

@ReneeW<\/a> <\/p>

Excellent!<\/p>

You're more than welcome!<\/p>

You were off with the space at the beginning and the parenthesis at the end.<\/p>

=IF_<\/strong>([ShipC Updated]@row = 1)<\/strong>, 1<\/p>

Remember! <\/strong>Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up\/Awesome or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-21 19:45:29","updateUser":{"userID":156200,"name":"ReneeW","url":"https:\/\/community.smartsheet.com\/profile\/ReneeW","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T20:54:14+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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":98993,"type":"question","name":"COUNTIFS Formula","excerpt":"Good morning, I am trying to do a COUNTIFS formula and getting a #Unparseable error here is the formula I am trying to set up. =COUNTIFS([Date]:[Date],(IFERROR(YEAR(@cell), 0) = 2022, IFERROR(MONTH(@cell), 0) = 12),([Exception Category]:[Exception Category], \"TILA\/RESPA\")) Thanks for your help.","categoryID":322,"dateInserted":"2022-12-21T18:01:00+00:00","dateUpdated":null,"dateLastComment":"2022-12-21T19:19:33+00:00","insertUserID":130906,"insertUser":{"userID":130906,"name":"Ivan Perez","url":"https:\/\/community.smartsheet.com\/profile\/Ivan%20Perez","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T19:19:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":130906,"lastUser":{"userID":130906,"name":"Ivan Perez","url":"https:\/\/community.smartsheet.com\/profile\/Ivan%20Perez","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T19:19:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":28,"score":null,"hot":3343297233,"url":"https:\/\/community.smartsheet.com\/discussion\/98993\/countifs-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/98993\/countifs-formula","format":"Rich","lastPost":{"discussionID":98993,"commentID":355135,"name":"Re: COUNTIFS Formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/355135#Comment_355135","dateInserted":"2022-12-21T19:19:33+00:00","insertUserID":130906,"insertUser":{"userID":130906,"name":"Ivan Perez","url":"https:\/\/community.smartsheet.com\/profile\/Ivan%20Perez","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T19:19:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2022-12-21T19:19:52+00:00","dateAnswered":"2022-12-21T19:01:27+00:00","acceptedAnswers":[{"commentID":355129,"body":"

@Ivan Perez<\/a> You need the conditional equation in your iferror statement. It also always follows criteria range, then criteria for each set. <\/p>

=COUNTIFS([Date]:[Date], IFERROR(YEAR(@cell) = 2022, 0), [Date]:[Date], IFERROR(MONTH(@cell) = 12, 0), [Exception Category]:[Exception Category], \"TILA\/RESPA\")<\/p>

if you wanted year and month combined, you could do that with the and function.<\/p>

=COUNTIFS([Date]:[Date], and(IFERROR(YEAR(@cell) = 2022, 0), IFERROR(MONTH(@cell) = 12, 0)), [Exception Category]:[Exception Category], \"TILA\/RESPA\")<\/p>

Let me know if that works.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-21 19:19:52","updateUser":{"userID":130906,"name":"Ivan Perez","url":"https:\/\/community.smartsheet.com\/profile\/Ivan%20Perez","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-21T19:19:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}}},"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":[]}],"title":"Trending Posts","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">