Index match returns a wrong value

kyle.macleod
kyle.macleod ✭✭
edited 12/09/19 inFormulas and Functions

Anyone able to help with an Index/match formula that returns a wrong value?

We've a formula that is returning a wrong value. I believe the formula is correct (it's the same way I write it in .xls). We are referencing another Smartsheet in the formula.

I understand if I was getting an error (#invalid value, #No match), but here we are getting an expected result, but it is the wrong value.

Formula: =INDEX(({SPB 2019 Range 1}), MATCH([SPB #]1, {SPB 2019 Range 2}), 1)

(I've tried removing the last 1 to no difference).

If it helps:

SPB2019 Range 1: Dropdown List

SPB#1: Text/Number

SPB2019 Range 2: Auto-number

In this case we're getting a possible value, "completed", even though the correct value is actually "executing"

A second issue is that we're quickly running into the limit of total number of links, even though we're no where close to the advertised limit.

We've spent a whole lot of time trying to fix this. Hopefully someone can help, because I'm apparently not smart enough. Thanks in advance.

Answers

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi Kyle,

    Try changing the 1 in the end to 0 instead.

    Did it work?

    Hope that helps!

    Have a fantastic week!

    Best,

    Andrée Starå

    Workflow Consultant / CEO @ WORK BOLD

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå| Workflow Consultant / CEO @WORK BOLD

    W:www.workbold.com| E:[email protected]| P: +46 (0) - 72 - 510 99 35

    Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.

  • Hello Andree, sadly that didn't work. I also tried no number, 2, -1....

    Thanks for trying, but my problem persists.

    -Kyle

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Do you have any empty or unused rows? Maybe a header row at the top? Try changing the value you are matching on and see if there is a consistent difference. Maybe its pulling the value from say 3 rows above the correct value every time or something to that affect.

    thinkspi.com

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Happy to help!

    I agree with Pauls comment below.

    Can you describe your process in more detail and maybe share the sheet(s) or somescreenshots? (Delete/replace any confidential/sensitive information before sharing) That would make it easier to help. (share too,[email protected])

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå| Workflow Consultant / CEO @WORK BOLD

    W:www.workbold.com| E:[email protected]| P: +46 (0) - 72 - 510 99 35

    Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.

  • kyle.macleod
    kyle.macleod ✭✭
    edited 09/08/19

    There WERE blank rows in the SS data we linked to. Also added the ,0 to the end of the equation:

    =INDEX({SPB 2019 CY Savings}, MATCH([SPB #]1, {SPB 2019 Range SPB}, 0))

    Here's the rub. Initially after removing empty rows in the referenced sheet and adding the "0", the formulas worked correctly.

    30 mins later values are corrupt again. FWIW, I only have View access to the referenced sheet (admin to mine). Also there are hundreds of people with access to this referenced sheet, with probably 5-10 at any given time making updates.

    Any ideas why they would work then mysteriously not?

  • here's a screenshot in the format this forum enjoys.

    screenshot SS.png

  • The blank row elimination from the referenced (view only) sheet, along with the addition of the ,0 at the end of the formula seems to have corrected the formulas, at least temporarily. It was good for about 30 mins until someone else added blank rows again.

    It'd be great to have a method to make the formula insensitive to extra rows.

    Thanks for the information & assistance.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Ok. So I am going to go ahead and apologize in advance. I am still trying to shake off "vacation brain", so I am having trouble getting my head back to where it was when I asked about the blank rows. I have a solution, but you are going to have to play with it a little to see which way works for you.

    .

    Use a COUNTIFS to basically count the blank rows and then add or subtract this number accordingly from the number produced by your MATCH function that determines the row number for your INDEX statement.

    是这样的……

    =INDEX({SPB 2019 CY Savings}, MATCH([SPB #]1, {SPB 2019 Range SPB}, 0)- COUNTIFS({SPB 2019 Range XYZ}, ISBLANK(@cell)))

    You may need to change the - to a +. You may also need to incorporate the number 10 either adding or subtracting as well as there are a default of 10 blank rows at the bottom of every sheet.

    .

    Again... I'm sorry I can't be more specific as to the actual solution. I spent 3 days in a kayak on the river, and my brain is still fighting this whole "work" thing. The above is the general idea though.

    Let me know if you can get it working. If not, I will check back in later once I have come to terms with the fact that I have to sit behind a desk instead of behind a fishing pole. Haha.

    thinkspi.com

  • Kayla Q
    Kayla Q ✭✭
    edited 09/30/22

    @Andrée Staråand@Paul NewcomeI'm going to chime in here because I'm experiencing a similar issue.

    I am using the following function: =IFERROR(INDEX({Matters Report Range 1}, MATCH([Legal Tracker Matter Tracker ID]@row, {Matters Report Range 2}), 0), "NOT IN OMR")

    image.png

    41032184 is not present in the lookup sheet (Matters Report), so this should return "NOT IN OMR."

    However, it is returning the value associated with lookup value 41010316.


    image.png

    I tried changing the 0 to a -1, and that worked, but it messed up the rest of my INDEX/MATCH functions. What on earth is going on? How do I ensure consistency in all of my functions?

    EDIT: If helpful, the same thing is happening on rows where there is no match and I would expect "NOT IN OMR" to return. Maybe this doesn't play nice with IFERROR?

    EDIT (again): I removed the IFERROR, and I'm still getting the same incorrect return value.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    @Kayla QIt looks like the Lookup value in the first screenshot is being stored as a text value (unless you formatted the cells). Is it possible you have some text and some numerical values in the same column of the reference sheet?

    thinkspi.com

  • Kayla Q
    Kayla Q ✭✭

    Hi@Paul Newcome

    Ithinkthis is set to a number format (see below). There is no ' in front of the numbers indicating a text format. Is there anything else I need to do?


    image.png


  • Kayla Q
    Kayla Q ✭✭

    @Paul NewcomeI figured it out! My "0" was in the wrong place -_-

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    @Kayla QThat would do it. Sorry I missed it too, but glad you were able to find it.

    thinkspi.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
Try IF([payment voucher]@row=0,Sum([Parking Revenue Regular]@row:[Private boat parking revenue]@row),\"//www.santa-greenland.com/community/discussion/comment/\")<\/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":106883,"type":"question","name":"Needing some help with my current smartsheet project","excerpt":"So I'm coming across some issues with my workflows and functions with my current sheet, and I'm hoping somebody could help me out because I'm stumped. There are boxes I have set up on children rows that get checked manually to confirm a certain portion of the Main Task is complete. I'm currently in search of a way I can…","categoryID":322,"dateInserted":"2023-06-26T13:40:29+00:00","dateUpdated":null,"dateLastComment":"2023-06-26T20:13:57+00:00","insertUserID":162756,"insertUser":{"userID":162756,"name":"SarahI","title":"Sarah","url":"https:\/\/community.smartsheet.com\/profile\/SarahI","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-26T19:19:04+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"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-26T20:54:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":8,"countViews":42,"score":null,"hot":3375602066,"url":"https:\/\/community.smartsheet.com\/discussion\/106883\/needing-some-help-with-my-current-smartsheet-project","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106883\/needing-some-help-with-my-current-smartsheet-project","format":"Rich","lastPost":{"discussionID":106883,"commentID":382423,"name":"Re: Needing some help with my current smartsheet project","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382423#Comment_382423","dateInserted":"2023-06-26T20:13:57+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-26T20:54:28+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-26T15:51:35+00:00","dateAnswered":"2023-06-26T15:23:39+00:00","acceptedAnswers":[{"commentID":382304,"body":"

@SarahI<\/a> Yes you can do that just use CHILDREN([COLUMN NAME])<\/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":106901,"type":"question","name":"Can you use a COUNTIF formula to county symbols?","excerpt":"I have a list of goals for the year and we are using harvey ball symbols to indicate the percent complete an the red, yellow, green, gray balls to indicate the health\/status of the project. I would like to display a report on my dashboard that shows the number of projects we have in each harvey ball stage and also in each…","categoryID":322,"dateInserted":"2023-06-26T15:59:48+00:00","dateUpdated":"2023-06-26T16:00:12+00:00","dateLastComment":"2023-06-26T16:29:45+00:00","insertUserID":162764,"insertUser":{"userID":162764,"name":"Stephanie D","title":"Program Manager","url":"https:\/\/community.smartsheet.com\/profile\/Stephanie%20D","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!mctWfgWrL7o!n-DX3ymVfmQ!msa32mT4_k9","dateLastActive":"2023-06-26T16:52:22+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":162764,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-06-26T23:47:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":26,"score":null,"hot":3375593973,"url":"https:\/\/community.smartsheet.com\/discussion\/106901\/can-you-use-a-countif-formula-to-county-symbols","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106901\/can-you-use-a-countif-formula-to-county-symbols","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106901,"commentID":382346,"name":"Re: Can you use a COUNTIF formula to county symbols?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382346#Comment_382346","dateInserted":"2023-06-26T16:29:45+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-06-26T23:47:23+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-26T16:24:48+00:00","dateAnswered":"2023-06-26T16:08:42+00:00","acceptedAnswers":[{"commentID":382328,"body":"

Hi @Stephanie D<\/a> <\/p>

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

Try something like this.<\/p>

=COUNTIF(Status:Status, \"Green\")<\/p>

=COUNTIF([% Complete]:[% Complete], \"Half\")<\/p>

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

I hope that helps!<\/p>

Be safe, and have a fantastic week!<\/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>"}]}},"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":[]}">

Trending in Formulas and Functions