公式:查找两个值

你好,
这个在Excel中很容易,但我不知道如何在SmartSheet中做到这一点。
我在SS上有三个栏目:水果、品牌和价格
[水果]1是苹果,[品牌]1是ABC有限公司,[价格]1是100
[水果]2是苹果,[品牌]1是XYZ有限公司,[价格]1是50
[水果]3是梨,[品牌]1是ABC有限公司,[价格]1是100
我想用公式求出XYZ苹果公司的价格,答案应该是50。
在SS中怎么做呢?
评论
-
瑞克 ✭✭✭✭✭✭
如果只有一行匹配,可以尝试使用sumifs
=SUMIFS([Price]:[Price],水果:水果,"Apple",品牌:品牌,"XYZ")
-
彼得·史密斯 ✭
对不起,我们需要再添加一列,日期到达。现在,如果我们需要为两个条件查找日期而不是价格,我们可以使用哪个公式
例如,查找苹果公司和ABC有限公司的到货日期。
我尝试用新的公式,收集也不工作
谢谢
-
瑞克 ✭✭✭✭✭✭
看起来您可以使用新的collect函数做一些事情
https://help.smartsheet.com/function/collect
= AVG(收集([日期到达]:[日期]到达,(水果):(水果),“苹果”,[品牌]:[品牌]," XYZ "))
-
彼得·史密斯 ✭
你好,
它显示无效的列值。
=AVG(COLLECT([接收日期]1:[接收日期]2,Fruit1:Fruit2, "Apple", Company1:Company2, "XYZ 123 Ltd")))
可能是因为我将接收列的日期设置为日期。如果我用数字代替日期,它就是功。但是这个应该被设置为日期
我不需要做任何计算。我只需要显示收到的日期。
如果公式正确,应该是2017年9月18日。如果我查找“Apple”和“XYZ 123 Td”,我只想得到答案。
水果公司日期收到
Apple ABC123 Ltd年6月6日
苹果XYZ 123有限公司2017年9月18日
谢谢
-
彼得·史密斯 ✭
对不起,胖手指。
如果我搜索“Apple”和“XYZ 123 Ltd”,我只想得到答案。
谢谢
-
瑞克 ✭✭✭✭✭✭
当在我正在查看的数据范围内没有匹配时,我得到了类似的错误。我认为这里的问题是,你想要搜索整个列,所以你需要删除数字
例如,你有([接收日期]1:[接收日期]2,但实际上应该是([接收日期]:[接收日期])
您需要avg函数,因为collect只返回集合
我在我的测试智能表中使用了以下内容,它返回了预期日期(column2和column3是我的实际列名)
=AVG(COLLECT([Due Date]:[Due Date], [Column2]:[Column2], "Sprint 1", [Column3]:[Column3], "2"))
我将这个公式放入的字段是一个日期字段(称为TestDate)。你把公式放在哪一列?
我有时还会得到一个错误,因为我没有在字段名周围加上括号(即使它们只有一个单词)。所以你可以试试[水果]1:[水果]2或[水果]:[水果]
-
彼得·史密斯 ✭
瑞克:
公式现在是功。棘手的是我忘记设置列属性为日期(我在列中键入公式,我发现列属性默认为文本/数字)
谢谢
类别
Try this<\/p>
=IF(Available@row > 0, \"PES\", JOIN(INDEX(COLLECT(Facility:Facility, [Microscope: 1]:[Microscope: 1], HAS(@cell,\"6633112443\")), 1)))<\/p>
Will this work for you?<\/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":106579,"type":"question","name":"Split Text","excerpt":"Can someone assist me? I need a formula on how to split the text for this below. Ex. LOW - VS-87 - Service-FS Battery Replacement Lead-MEGA MALL-1259410 I need a to have a column that would write MEGA MALL only.","categoryID":322,"dateInserted":"2023-06-17T17:04:55+00:00","dateUpdated":null,"dateLastComment":"2023-06-18T01:39:56+00:00","insertUserID":103391,"insertUser":{"userID":103391,"name":"Marilen.Navarro103391","url":"https:\/\/community.smartsheet.com\/profile\/Marilen.Navarro103391","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2019-09\/60\/88\/n6088a8f5166f388fd95cfcb413bcbd0e.jpg","dateLastActive":"2023-06-18T01:41:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":112221,"lastUser":{"userID":112221,"name":"Kelly Moore","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20Moore","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jnPa4zng1Pw!n1lbH6Wxgbo!UbxYNkVsKJw","dateLastActive":"2023-06-19T02:46:11+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":29,"score":null,"hot":3374075691,"url":"https:\/\/community.smartsheet.com\/discussion\/106579\/split-text","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106579\/split-text","format":"Rich","lastPost":{"discussionID":106579,"commentID":381096,"name":"Re: Split Text","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381096#Comment_381096","dateInserted":"2023-06-18T01:39:56+00:00","insertUserID":112221,"insertUser":{"userID":112221,"name":"Kelly Moore","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20Moore","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jnPa4zng1Pw!n1lbH6Wxgbo!UbxYNkVsKJw","dateLastActive":"2023-06-19T02:46:11+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-18T01:42:10+00:00","dateAnswered":"2023-06-18T01:39:56+00:00","acceptedAnswers":[{"commentID":381096,"body":"
Hey @Marilen.Navarro103391<\/a> <\/p>
Please use the formula I provided. It was intentional for the character \"~\" to be included. <\/p>