SUMIFS不工作(参考另一张表)

我正在努力使一个SUMIFS函数正常工作,这是引用另一个表。

所以在我的表格上,这个函数是:

=SUMIFS({Total GL Detail Range 4}, {Total GL Detail Range 5}, Project8, {Total GL Detail Range 3},(电子邮件保护)

…其中“总帐明细”是引用的另一张表。范围4是我想要总结的美元金额的列,范围5是项目ID编号的列(引用的Project8单元格是我想要引用的特定项目ID在当前工作表中的位置),范围3是三个单词(“收入”,“成本”和“利润率”)的列。(电子邮件保护)是当前工作表中引用“收入”一词的位置)。所以我基本上是根据特定的项目ID和特定类型的美元(收入)来总结数据。

这个函数只给我一个0美元而总数应该是实际的美元总和。知道我哪里做错了吗?(或者是否有更聪明的方法?)谢谢你!

最佳答案

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭
    ✓回答

    好的。本周早些时候,我刚刚让另一个人遇到了同样的问题。即使在将所有id转换为文本之后,它仍然不起作用。让我们尝试将源表上的所有内容转换为数字。使用去掉ID并将其包装在VALUE函数中的LEFT公式。

    =价值(左 (.......................))


    然后再次尝试对ID使用COUNTIFS,但不是引用我们创建的公式表中的辅助单元格,而是引用包含数值的链接单元格。

    thinkspi.com

«1

答案

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    输出0的原因有很多,所以让我们从最基本的开始,并从那里开始向下处理列表。


    源工作表中的美元金额究竟是如何填写的?

    thinkspi.com

  • 美元被一个函数填充。具体功能为:(电子邮件保护)它引用了表格中的另一列,这实际上是另一个函数本身。

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    源函数是什么?

    thinkspi.com

  • Net列中的函数为:(电子邮件保护)-(电子邮件保护)它引用源表中的另外两个列。借方和贷方列包含从Excel粘贴进来的数据(没有函数)。如果曾经有一个借方金额,那么在它旁边的同一行中就没有对应的贷方金额(贷方列亦然)。净栏的目标是将这两栏合并在一起,所有借方金额显示为正,所有贷方金额显示为负。美元列(在另一个工作表的初始函数中是Range 4)的目的是翻转符号。(出于其他目的,我想用两列显示双向信号。)Net列和dollar列都被设置为函数列,而不是单元格函数。

    我为我的天真道歉……我是Smartsheet的新手。)

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    所以听起来我们确实在吸引更多的人。我们可以继续下一段了。你的ID栏…


    他们是如何被填充的,你能提供一些数据的样本吗?

    thinkspi.com

  • 项目ID号是主列,也是一个列函数。它们只是像“409642”这样的六位数。列中的函数为:=LEFT([TS项目-全名]@row, 6)其中引用的另一列有项目的全名和编号(例如。“409642 - X项目”,总是这个格式)。“TS项目-全名”栏也是另一个栏函数,它是:=MID([Line Description]@row, (FIND("#", [Line Description]@row) + 1), 100)它从“行描述”列中剥离数据,该列已从Excel中粘贴数据。项目编号和名称总是在行描述中的#符号后面。

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    我想我们可能有发现了。您如何在第二张表格(有SUMIFS的那张)中输入项目编号?

    thinkspi.com

  • 因此,SUMIFS函数从同一工作表中的另一个单元格(而不是引用的工作表)中提取项目ID号。该单元格位于不同的列中,但仅位于我的数据下方。现在,单元格链接到另一个第三个工作表(称为“项目元数据”),但我已经尝试了它,其中项目ID号仅仅是硬键输入(仍然$0结果),以及项目ID号被链接到工作表中的另一个单独的单元格中,但随后仅在用于SUMIFS函数的单元格中引用(仍然$0结果)。我总是得到一个$0或一个错误作为答案(记不清我过去得到过什么错误)。

    我附上了SUMIFS公式所在表格的截图…SUMIFS公式所在的单元格位于红色框中的单元格中,项目ID号用蓝色箭头指出。

    Example.pdf


  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    好的。我想我们可能找到问题了。在您的屏幕截图中,包含项目编号的链接单元格是正确对齐的。假设您没有对该单元格应用任何格式,这将显示它被存储为数值。MID和LEFT函数输出文本字符串。虽然它们可能看起来一样,但一个被认为是数字,另一个被认为是文本,这意味着你不会得到匹配。


    在你最近的屏幕截图中,在项目编号右边的单元格中输入以下内容:

    (电子邮件保护)”+“


    像这样在单元格引用的末尾“添加”双引号将把它从数字转换为文本字符串。您应该看到,这个新单元格现在在单元格内被正确对齐。


    如果引用这个而不是链接的ID会发生什么?

    =SUMIFS({Total GL Detail Range 4}, {Total GL Detail Range 5},(修改后的预算)8,{总GL细节范围3},(电子邮件保护)

    thinkspi.com

  • 这说得通……我现在已经做了这个更改,但它仍然显示为0美元,所以我想知道这里是否有别的东西在起作用。但至少这个问题已经解决了。

    我附上了一个更新的屏幕截图,以及从源表的功能中使用的列(范围)的屏幕截图,以防有任何视觉上的帮助

    例子updated.pdf
    源Sheet.pdf

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    唯一留给我们的是标题部分,但根据你的截图,这看起来应该没问题。让我们切换到COUNTIFS来做一些额外的故障排除。

    我们可以从两个不同的开始。每个范围/标准集各一个(ID和Title分别完成)。

    =COUNTIFS({总账细节范围5},[修订预算]8)

    =COUNTIFS({Total GL Detail Range 3},(电子邮件保护)

    thinkspi.com

  • 好了,项目ID号([修订预算]8单元格)上的第一个COUNTIFS函数显示为0,这意味着它不能正常工作。

    另一个COUNTIFS函数((电子邮件保护)cell)工作正常,总共计算了19个单词“Revenue”。

    所以这与源表中的项目ID号有关……

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭
    ✓回答

    好的。本周早些时候,我刚刚让另一个人遇到了同样的问题。即使在将所有id转换为文本之后,它仍然不起作用。让我们尝试将源表上的所有内容转换为数字。使用去掉ID并将其包装在VALUE函数中的LEFT公式。

    =价值(左 (.......................))


    然后再次尝试对ID使用COUNTIFS,但不是引用我们创建的公式表中的辅助单元格,而是引用包含数值的链接单元格。

    thinkspi.com

  • 啊哈!那工作! !奇怪的是,我甚至不需要更改文本形式的辅助单元格引用。它适用于文本单元格和数字单元格。只是必须确保将它引用的范围更改为数字。

    非常感谢!!

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    很乐意帮忙。


    @Genevieve P。你知道有什么变化会影响这个功能吗?

    在过去,如果我们有一个ID列,其中一些有前导零,而另一些没有,我们可以使用[column Name]@row + ""方法将所有内容转换为文本,并且匹配会很好地工作。这一周有两次它没有工作,我们不得不使用VALUE函数将id转换为数字以使其工作。

    thinkspi.com

帮助文章参考资料欧宝体育app官方888

想要直接在智能表中练习使用公式吗?

请查看公式手册模板!
@Pamela Wagner<\/a> There's nothing in core Smartsheet. <\/p>

If you have a unique ID (like ticket number) that is in both sheets, you could use DataMesh if you have access to that or cross sheet formulas to pull in the data you want based on the matching unique ID.<\/p>

Otherwise, you'd have to use an Add-on. If you are interested in hearing about an add-on that can do this, send me a message at https:\/\/smartsheetguru.com\/contact<\/a><\/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":106845,"type":"question","name":"Count function","excerpt":"Hi I need help with a formula. I have a column that I want to count but only based on a values in a different column. I have tried the following formula but it's not working and I can't figure out what I am doing wrong. =countif([Test Script #]:[Test Script #], [Pass ?]:[Pass ?], <> \"N\/A\") The Test Script # column is the…","categoryID":322,"dateInserted":"2023-06-23T17:50:06+00:00","dateUpdated":null,"dateLastComment":"2023-06-23T19:30:43+00:00","insertUserID":127983,"insertUser":{"userID":127983,"name":"Carol-Anne Cerbone","url":"https:\/\/community.smartsheet.com\/profile\/Carol-Anne%20Cerbone","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!h1jY4Qxc4TY!prNYaQRZvvo!a6wiwaB2GsY","dateLastActive":"2023-06-23T19:29:42+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"updateUserID":null,"lastUserID":127983,"lastUser":{"userID":127983,"name":"Carol-Anne Cerbone","url":"https:\/\/community.smartsheet.com\/profile\/Carol-Anne%20Cerbone","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!h1jY4Qxc4TY!prNYaQRZvvo!a6wiwaB2GsY","dateLastActive":"2023-06-23T19:29:42+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":8,"countViews":44,"score":null,"hot":3375096049,"url":"https:\/\/community.smartsheet.com\/discussion\/106845\/count-function","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106845\/count-function","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106845,"commentID":382093,"name":"Re: Count function","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382093#Comment_382093","dateInserted":"2023-06-23T19:30:43+00:00","insertUserID":127983,"insertUser":{"userID":127983,"name":"Carol-Anne Cerbone","url":"https:\/\/community.smartsheet.com\/profile\/Carol-Anne%20Cerbone","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!h1jY4Qxc4TY!prNYaQRZvvo!a6wiwaB2GsY","dateLastActive":"2023-06-23T19:29:42+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":"2023-06-23T19:30:46+00:00","dateAnswered":"2023-06-23T19:28:59+00:00","acceptedAnswers":[{"commentID":382092,"body":"

@Carol-Anne Cerbone<\/a> <\/p>

How about this?<\/p>

=COUNT([Test Script #]:[Test Script #]) - COUNTIF([Pass?]:[Pass?], =\"N\/A\")<\/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"}]},{"discussionID":106844,"type":"question","name":"Avg number of selections per condition","excerpt":"Hi there, I need some help. I'm trying to calculate the avg number of issues per condition in our master tracker. The issues are in a multi-value cell {Rev Rec Master Tracker Range 1} while the condition is a single-value cell in {Rev Rec Master Tracker Range 2} with values either as \"Backlog\" or \"Net New\". I'd like to…","categoryID":322,"dateInserted":"2023-06-23T17:36:11+00:00","dateUpdated":null,"dateLastComment":"2023-06-23T18:36:10+00:00","insertUserID":162710,"insertUser":{"userID":162710,"name":"Leah Schmid","url":"https:\/\/community.smartsheet.com\/profile\/Leah%20Schmid","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtenj_SBCEO-5DL1Uq6fCj1Eudu-GWv5LWQWq-DX-A=s96-c","dateLastActive":"2023-06-23T19:56:32+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":162710,"lastUser":{"userID":162710,"name":"Leah Schmid","url":"https:\/\/community.smartsheet.com\/profile\/Leah%20Schmid","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtenj_SBCEO-5DL1Uq6fCj1Eudu-GWv5LWQWq-DX-A=s96-c","dateLastActive":"2023-06-23T19:56:32+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":35,"score":null,"hot":3375089541,"url":"https:\/\/community.smartsheet.com\/discussion\/106844\/avg-number-of-selections-per-condition","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106844\/avg-number-of-selections-per-condition","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106844,"commentID":382062,"name":"Re: Avg number of selections per condition","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382062#Comment_382062","dateInserted":"2023-06-23T18:36:10+00:00","insertUserID":162710,"insertUser":{"userID":162710,"name":"Leah Schmid","url":"https:\/\/community.smartsheet.com\/profile\/Leah%20Schmid","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtenj_SBCEO-5DL1Uq6fCj1Eudu-GWv5LWQWq-DX-A=s96-c","dateLastActive":"2023-06-23T19:56:32+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":"2023-06-23T18:35:49+00:00","dateAnswered":"2023-06-23T18:26:57+00:00","acceptedAnswers":[{"commentID":382060,"body":"

So for \"Backlog\" you would want it to count 3 Action Plan Notes and then divide by 2 \"Backlog\" entries? If so, try this:<\/p>

=COUNTM(COLLECT({Action Plan Notes}, {RR Type}, @cell = \"Backlog\")) \/ COUNTIFS({RR Type}, @cell = \"Backlog\")<\/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"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&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 in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

公式和函数趋势