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.

Formula: Look Up for two value

Peter Smith
edited 12/09/19 inArchived 2017 Posts

Hi,

This one is pretty easy in Excel but I have no idea how to do that in SmartSheet.

I have 3 columns in SS: Fruit, Brand and Price

[Fruit]1 is Apple , [Brand]1 is ABC Ltd. [Price]1 is 100

[Fruit]2 is Apple , [Brand]1 is XYZ Ltd. [Price]1 is 50

[Fruit]3 is Pear, [Brand]1 is ABC Ltd. [Price]1 is 100

I want to have formula to find price of XYZ Ltd Apple, the answer should be 50.

How can I do it in SS?

Comments

  • ricki
    ricki ✭✭✭✭✭✭

    If you only will have one row that matches you could try to use sumifs

    =SUMIFS([Price]:[Price], Fruit:Fruit, "Apple", Brand:Brand, "XYZ")

  • Sorry we need to add one more column, date arrive . Now, if we need to look for date instead of price for two critera, which formula we can use

    E.g., look for date arrive for apple and ABC Ltd.

    I try to use new formula, collect also not work

    Thanks

  • ricki
    ricki ✭✭✭✭✭✭

    Looks like you can do something with the new collect function

    https://help.smartsheet.com/function/collect

    =AVG(COLLECT([Date Arrive]:[Date Arrive], [Fruit]:[Fruit], "Apple", [Brand]:[Brand], "XYZ"))

  • Hi,

    It shows invalid column value.

    = AVG(收集([日期接收]1:接收日期2, Fruit1:Fruit2, "Apple", Company1:Company2, "XYZ 123 Ltd"))

    May be because I set the date to receive column as date. If I put number instead of date, its work. But this one should be set up as date

    I do not need to have any calculation. I just need to show the date to receive.

    If the formula is right, it should shows Sep 18, 2017. I just want to get answer if I look up for "Apple" and "XYZ 123 Td)

    Fruit Company Date to receive

    Apple ABC123 Ltd 06/06/17

    Apple XYZ 123 Ltd 09/18/17

    Thanks

  • sorry , fat finger.

    I just want to get answer if I look up for "Apple" and "XYZ 123 Ltd"

    Thanks

  • ricki
    ricki ✭✭✭✭✭✭

    I got a similar error when there was no match in the range of data I was looking at. I think the issue here is that you want to be searching the whole column so you need to remove the numbers

    ie you have ([Date to receive]1:[Date to receive]2 but it should really be ([Date to receive]:[Date to receive]

    You need the avg function because the collect just returns the collection

    I used the following in my test smartsheet and it returned the expected date (column2 and column3 were my actual column names)

    =AVG(COLLECT([Due Date]:[Due Date], [Column2]:[Column2], "Sprint 1", [Column3]:[Column3], "2"))

    The field I put this formula into was a date field (called TestDate). What column did you put your formula into?

    我有时也会得到一个错误,因为我didn't have brackets around the field names (even though they were only one word). So you may want to try [Fruit]1:[Fruit]2 or [Fruit]:[Fruit]

  • Ricki:

    The formula is work now. Tricky thing is I forget to set column property as Date (I type formula in column and I find out the column property default as text/number)

    Thanks

This discussion has been closed.
Awesome! I'm glad it's working for you. 👍️<\/span><\/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":107147,"type":"question","name":"Using IFERROR Formula - Still getting UNPARSEABLE error","excerpt":"I'm calculating a Burn Rate Percentage so it's using a basic calculation FORMULA =[Column4]@row \/ [Column2]@row --> This works fine However when one of the Column is a ZERO, I get a #DIVDE BY ZERRO error displayed. To address this error, I used an IFERROR but it's giving me an \"UNPARSEABLE\" error. I want the cell to…","snippet":"I'm calculating a Burn Rate Percentage so it's using a basic calculation FORMULA =[Column4]@row \/ [Column2]@row --> This works fine However when one of the Column is a ZERO, I get…","categoryID":343,"dateInserted":"2023-06-30T16:32:54+00:00","dateUpdated":"2023-06-30T16:35:50+00:00","dateLastComment":"2023-06-30T18:58:03+00:00","insertUserID":161931,"insertUser":{"userID":161931,"name":"Christine Cao","title":"Engagement Manager","url":"https:\/\/community.smartsheet.com\/profile\/Christine%20Cao","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-01T00:40:29+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-30T20:24:17+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":25,"score":null,"hot":3376296057,"url":"https:\/\/community.smartsheet.com\/discussion\/107147\/using-iferror-formula-still-getting-unparseable-error","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107147\/using-iferror-formula-still-getting-unparseable-error","format":"Rich","lastPost":{"discussionID":107147,"commentID":383396,"name":"Re: Using IFERROR Formula - Still getting UNPARSEABLE error","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/383396#Comment_383396","dateInserted":"2023-06-30T18:58:03+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-30T20:24:17+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Using Smartsheet","url":"https:\/\/community.smartsheet.com\/categories\/using-smartsheet"},{"name":"Add Ons and Integrations","url":"https:\/\/community.smartsheet.com\/categories\/apps-and-integrations"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-30T18:53:59+00:00","dateAnswered":"2023-06-30T18:25:40+00:00","acceptedAnswers":[{"commentID":383387,"body":"

You need to remove the closing parenthesis from before the comma.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":343,"name":"Add Ons and Integrations","url":"https:\/\/community.smartsheet.com\/categories\/apps-and-integrations","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":107143,"type":"question","name":"How can I get (on a separate metric sheet) the average SLA time within a given month?","excerpt":"I am trying to create a metric sheet to document how long response and acknowledgement times are taking per month for record keeping. I have a sheet that has an acknowledgement SLA column and a \"date of request\" (auto column for when the submission was created), and I'm looking to record the average for each month on a…","snippet":"I am trying to create a metric sheet to document how long response and acknowledgement times are taking per month for record keeping. I have a sheet that has an acknowledgement…","categoryID":322,"dateInserted":"2023-06-30T15:31:46+00:00","dateUpdated":null,"dateLastComment":"2023-06-30T17:30:08+00:00","insertUserID":159225,"insertUser":{"userID":159225,"name":"laney_white","url":"https:\/\/community.smartsheet.com\/profile\/laney_white","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!5FvXObtmaHw!CVFXQvc68Xo!anynrNoWe-v","dateLastActive":"2023-06-30T17:19:19+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":161714,"lastUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-07-01T01:19:34+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":21,"score":null,"hot":3376287114,"url":"https:\/\/community.smartsheet.com\/discussion\/107143\/how-can-i-get-on-a-separate-metric-sheet-the-average-sla-time-within-a-given-month","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107143\/how-can-i-get-on-a-separate-metric-sheet-the-average-sla-time-within-a-given-month","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":107143,"commentID":383369,"name":"Re: How can I get (on a separate metric sheet) the average SLA time within a given month?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/383369#Comment_383369","dateInserted":"2023-06-30T17:30:08+00:00","insertUserID":161714,"insertUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-07-01T01:19:34+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\/ZXS917R2FJKC\/master-sheet-png.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"master sheet.PNG"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-30T17:19:35+00:00","dateAnswered":"2023-06-30T15:50:27+00:00","acceptedAnswers":[{"commentID":383345,"body":"

If I understand correctly, this may help.<\/p>

=AVERAGEIF({date of request}, MONTH(@cell) = 2, {Ack SLA})<\/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&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