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

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

请查看公式手册模板!
Hey @Marilen.Navarro103391<\/a> <\/p>

Please use the formula I provided. It was intentional for the character \"~\" to be included. <\/p>

=MID(Name@row, FIND(\"~\", SUBSTITUTE(Name@row, \"-\", \"~\", 5)) + 1, FIND(\"~\", SUBSTITUTE(Name@row, \"-\", \"~\", 6)) - 1 - FIND(\"~\", SUBSTITUTE(Name@row, \"-\", \"~\", 5)))<\/p>

Kelly<\/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":106552,"type":"question","name":"Problem w\/Index - Match formula","excerpt":"I using the following formula, =INDEX({Contract Focal Point}, MATCH([Contract No.]@row, {Contract No.}), 0) And it works for the first row when i input in the contract number into the column. On subsequent rows when i input the contract number it pulls back incorrect information and if I put in a fictious number it pulls…","categoryID":322,"dateInserted":"2023-06-16T15:13:32+00:00","dateUpdated":null,"dateLastComment":"2023-06-16T15:36:24+00:00","insertUserID":162467,"insertUser":{"userID":162467,"name":"Ed Smartsheet","title":"Mr","url":"https:\/\/community.smartsheet.com\/profile\/Ed%20Smartsheet","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AATXAJyYOjKt3k3tneIFbUPuoJzZbnd9quLS-Wdt5b7l=s96-c","dateLastActive":"2023-06-16T19:45:18+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":91566,"lastUser":{"userID":91566,"name":"Genevieve P.","title":"Community Manager","url":"https:\/\/community.smartsheet.com\/profile\/Genevieve%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/KHY4Y67W0VRX\/nF76D5N9MFB28.png","dateLastActive":"2023-06-16T17:50:53+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":32,"score":null,"hot":3373859396,"url":"https:\/\/community.smartsheet.com\/discussion\/106552\/problem-w-index-match-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106552\/problem-w-index-match-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106552,"commentID":381031,"name":"Re: Problem w\/Index - Match formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381031#Comment_381031","dateInserted":"2023-06-16T15:36:24+00:00","insertUserID":91566,"insertUser":{"userID":91566,"name":"Genevieve P.","title":"Community Manager","url":"https:\/\/community.smartsheet.com\/profile\/Genevieve%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/KHY4Y67W0VRX\/nF76D5N9MFB28.png","dateLastActive":"2023-06-16T17:50:53+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"}},"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-16T19:45:15+00:00","dateAnswered":"2023-06-16T15:36:24+00:00","acceptedAnswers":[{"commentID":381031,"body":"

Hey @Ed Smartsheet<\/a> <\/p>

In addition to the IFERROR, it looks like you have the , 0 in the INDEX portion of the formula instead of the MATCH. Try moving it in one:<\/p>

=INDEX({Contract Focal Point}, MATCH([Contract No.]@row, {Contract No.}, 0))<\/strong><\/p>

Cheers,<\/p>

Genevieve<\/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":106550,"type":"question","name":"Invalid Operation","excerpt":"Good morning, I am trying to sum the entries that are greater than 30 but less than 60 days old. =SUMIFS({011-AP Archive -# of Days to Complete}, >30, {011-AP Archive -# of Days to Complete}, <60) I was able to do this same formula with a COUNTIFS but its' not working the same, what am I missing.","categoryID":322,"dateInserted":"2023-06-16T15:00:58+00:00","dateUpdated":null,"dateLastComment":"2023-06-16T15:22:46+00:00","insertUserID":156010,"insertUser":{"userID":156010,"name":"AliT","url":"https:\/\/community.smartsheet.com\/profile\/AliT","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!80tRN2Ch-HQ!nDHdH1rxiPw!1_-nYVqJJzq","dateLastActive":"2023-06-16T15:22:32+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":156010,"lastUser":{"userID":156010,"name":"AliT","url":"https:\/\/community.smartsheet.com\/profile\/AliT","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!80tRN2Ch-HQ!nDHdH1rxiPw!1_-nYVqJJzq","dateLastActive":"2023-06-16T15:22:32+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":36,"score":null,"hot":3373857824,"url":"https:\/\/community.smartsheet.com\/discussion\/106550\/invalid-operation","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106550\/invalid-operation","format":"Rich","lastPost":{"discussionID":106550,"commentID":381027,"name":"Re: Invalid Operation","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381027#Comment_381027","dateInserted":"2023-06-16T15:22:46+00:00","insertUserID":156010,"insertUser":{"userID":156010,"name":"AliT","url":"https:\/\/community.smartsheet.com\/profile\/AliT","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!80tRN2Ch-HQ!nDHdH1rxiPw!1_-nYVqJJzq","dateLastActive":"2023-06-16T15:22: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-16T15:22:31+00:00","dateAnswered":"2023-06-16T15:19:44+00:00","acceptedAnswers":[{"commentID":381026,"body":"

Try this:<\/p>

SUMIFS({011-AP Archive -# of Days to Complete}, {011-AP Archive -# of Days to Complete}, > 30, {011-AP Archive -# of Days to Complete}, < 60)<\/p>

With SUMIFS, you have to include the range to SUM separately from the ranges to compare. In your scenario, they are the same, but can be different.<\/p>

SUMIFS( range, criterion_range1, criterion1, [ criterion_range2, ​criterion2​... ])<\/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&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":[]}">

公式和函数趋势