INDEX formula

JennS_
JennS_ ✭✭
edited 01/12/23 inFormulas and Functions

I am trying to pull in a date based on a specific criteria from another sheet (sheet is called SOW BB28-A tracking). For example, I have an item (Fleet No ) and a warranty start date. I want to pull the warranty date into a master sheet based on the fleet number. I have tried the INDEX formula a million diff ways and its not working for me.

=INDEX({SOW BB28-A Tracking Range 2}, MATCH([Fleet No]@row, {SOW BB28-A range 3}, 0)

I know this should be so easy. What am I missing??

Answers

  • I am not understanding your question exactly, but you must Index a piece of information, if you can match a piece of information on your current sheet with the same information on the sheet you reference. When the info matches, the Indexed info will be pulled over:

    Index(date wanted on referenced sheet), match(Fleet[email protected], Fleet no on the referenced sheet)

  • JennS_
    JennS_ ✭✭
    edited 01/11/23

    I have a fleet number on 2 separate sheets. I want to pull the date that the warranty starts for a specific fleet number and have it update in the other sheet for the matching fleet number. See master sheet below. I am trying to pull the warranty date from second image below, into this sheet where the fleet numbers match.

    image.png
    image.png


  • Paul H
    Paul H ✭✭✭✭✭✭

    Might just be missing a bracket at the end

    =INDEX({SOW BB28-A Tracking Range 2}, MATCH([Fleet No]@row, {SOW BB28-A range 3}, 0))

  • JennS_
    JennS_ ✭✭

    Hi- that did not work for me. I really can't figure it out!

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi@JennS_

    You formula syntax is correct - I'd like to try troubleshooting a few different things.

    First, check to make sure your two ranges are looking at the right columns, and that the full columns are selected

    • {SOW BB28-A Tracking Range 2} = Warranty Start Date
    • {SOW BB28-A range 3} = Fleet No

    If that's correct, the next thing to check is that the formula is finding a match for your Fleet No in the current sheet.

    =COUNTIF({SOW BB28-A range 3}, [Fleet No]@row)

    ^This should give you a number. If you're getting 0, then the formula isn't finding a match between those two columns - in this instance we'd need to know what type of columns your two [Fleet No] columns are, and how the number is created/input.

    A final note... I see that your formula states [Fleet No]@row but the column name looks to be [Fleet No.] with a period. Make sure that your column name is exactly the same in the formula as in your current sheet

    If this hasn't helped, let us know if you're seeing a formula error message (and which one) or if you're getting an incorrect result!

    Thanks,

    Genevieve

  • JennS_
    JennS_ ✭✭
    edited 01/12/23

    Genevieve - Thank you for your notes. I checked all of these items to the formula below:

    =INDEX({SOW BB28-A Warranty Start Date}, MATCH([Fleet No.]@row), {SOW BB28-A Tracking Fleet No}, 0))

    The error I get is #UNPARSEABLE

    I even tried this:

    =INDEX({SOW BB28-A Warranty Start Date}, COUNTIF([Fleet No.]@row), {SOW BB28-A Tracking Fleet No}, 0))

    它仍然不工作。问题是一旦你limited within a sheet to doing this type of formula? For instance, I have another column that also does an index to another sheet. Could that be causing a problem? I have also used linked cells in my master sheet, but I have so many linked cells that I was trying to make it easier to pull information by index formula. Any additional help is appreciated.

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi@JennS_

    For your first formula, there's an extra ) after MATCH(___) that should be removed:

    =INDEX({SOW BB28-A Warranty Start Date}, MATCH([Fleet No.]@row, {SOW BB28-A Tracking Fleet No}, 0))


    For the COUNTIF formula, I meant to test it fully on it's own, simply to see if it's finding a match at all! This is a troubleshooting step, not something for your end formula

    =COUNTIF({SOW BB28-A range 3}, [Fleet No]@row)


    But before you do that, see if removing the extra ) made the first formula work! Even if you're using INDEX(MATCH in a different column, you should still be able to use it in this column. Just make sure you're not copy/pasting the same formula andediting referencesas that will update the reference across the entire sheet. Instead, create new references from scratch to make sure it's looking at the right column.

    让我知道帮助!

  • JennS_
    JennS_ ✭✭

    @Genevieve P.

    Okay! I updated the first formula and this time I got #INVALID COLUMN VALUE. Progress !?

    And as an FYI- the countif verification did work. It returned a number of 1.

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi@JennS_

    That's great that the COUNTIF works! :) That means that it should find a match.

    #无效的公司lumn Value generally means that the column type is different than the value you're putting in it. Can you confirm thatbothcolumns are Date type of columns?

    {SOW BB28-A Warranty Start Date} and the column where the formula is being input?

  • JennS_
    JennS_ ✭✭

    @Genevieve P.

    I just confirmed, and they were not both date columns! So i updated it and it WORKED! I can't believe it was something so simple. I appreciate your help!!! You are the best.

  • Genevieve P.
    Genevieve P. Employee Admin

    No problem at all! I'm glad we got there in the end

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out theFormula Handbook template!
Your syntax is off, and you shouldn't need a MATCH function if you are using a COLLECT function.<\/p>

=IFERROR(INDEX(COLLECT({Count of Holds}, {Count of Holds}, @cell> 0, {Site}, @cell = Site@row), 1), \"\")<\/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"},{"tagID":292,"urlcode":"Dashboards","name":"Dashboards"}]},{"discussionID":107800,"type":"question","name":"Is it possible to separate an address into Street, City, and State?","excerpt":"I have a column of addresses that I want to separate into 3 columns for street, city, and state. For example: 1 Tesla Road, Austin, Texas, 78725 Street: 1 Tesla Road City: Austin State: Texas Is there a formula I could use to separate the address into 3 columns by the commas?","snippet":"I have a column of addresses that I want to separate into 3 columns for street, city, and state. For example: 1 Tesla Road, Austin, Texas, 78725 Street: 1 Tesla Road City: Austin…","categoryID":322,"dateInserted":"2023-07-19T15:00:18+00:00","dateUpdated":null,"dateLastComment":"2023-07-19T18:32:05+00:00","insertUserID":144076,"insertUser":{"userID":144076,"name":"Carlee Schiffner","url":"https:\/\/community.smartsheet.com\/profile\/Carlee%20Schiffner","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-19T18:32:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":144076,"lastUser":{"userID":144076,"name":"Carlee Schiffner","url":"https:\/\/community.smartsheet.com\/profile\/Carlee%20Schiffner","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-19T18:32:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":7,"countViews":46,"score":null,"hot":3379574543,"url":"https:\/\/community.smartsheet.com\/discussion\/107800\/is-it-possible-to-separate-an-address-into-street-city-and-state","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107800\/is-it-possible-to-separate-an-address-into-street-city-and-state","format":"Rich","lastPost":{"discussionID":107800,"commentID":386041,"name":"Re: Is it possible to separate an address into Street, City, and State?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/386041#Comment_386041","dateInserted":"2023-07-19T18:32:05+00:00","insertUserID":144076,"insertUser":{"userID":144076,"name":"Carlee Schiffner","url":"https:\/\/community.smartsheet.com\/profile\/Carlee%20Schiffner","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-19T18:32:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-19T18:32:13+00:00","dateAnswered":"2023-07-19T15:37:11+00:00","acceptedAnswers":[{"commentID":385966,"body":"

Here are some slight variations using SUBSTITUTE():<\/p>

Street:<\/p>

=LEFT([Address]@row, FIND(\",\", [Address]@row) - 1)<\/p>

City:<\/p>

=MID([Address]@row, FIND(\",\", [Address]@row) + 1, FIND(\"!\", SUBSTITUTE([Address]@row, \",\", \"!\", 2)) - FIND(\",\", [Address]@row) - 1)<\/p>

State:<\/p>

=MID([Address]@row, FIND(\"!\", SUBSTITUTE([Address]@row, \",\", \"!\", 2)) + 1, FIND(\"!\", SUBSTITUTE([Address]@row, \",\", \"!\", 3)) - FIND(\"!\", SUBSTITUTE([Address]@row, \",\", \"!\", 2)) - 1)<\/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":107796,"type":"question","name":"Count if date is in the past","excerpt":"Hi All, I am looking for a solution to a problem, I am trying to pull together a chart for a dashboard, displaying the number of overdue documents under review we have - the sheet is set up as below, and I have set up a 'metric sheet' however I am not sure this is the best solution. I have been using this =COUNTIFS({Master…","snippet":"Hi All, I am looking for a solution to a problem, I am trying to pull together a chart for a dashboard, displaying the number of overdue documents under review we have - the sheet…","categoryID":322,"dateInserted":"2023-07-19T14:29:11+00:00","dateUpdated":null,"dateLastComment":"2023-07-19T19:01:19+00:00","insertUserID":161866,"insertUser":{"userID":161866,"name":"Kirsteen Leckie","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/Kirsteen%20Leckie","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-19T18:47:21+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":137019,"lastUser":{"userID":137019,"name":"Samuel Mueller","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Samuel%20Mueller","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B9G8B70WXQWC\/nKTI46EH9WQOM.jpg","dateLastActive":"2023-07-19T19:00:01+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":6,"countViews":21,"score":null,"hot":3379573830,"url":"https:\/\/community.smartsheet.com\/discussion\/107796\/count-if-date-is-in-the-past","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107796\/count-if-date-is-in-the-past","format":"Rich","tagIDs":[254,265,292],"lastPost":{"discussionID":107796,"commentID":386059,"name":"Re: Count if date is in the past","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/386059#Comment_386059","dateInserted":"2023-07-19T19:01:19+00:00","insertUserID":137019,"insertUser":{"userID":137019,"name":"Samuel Mueller","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Samuel%20Mueller","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B9G8B70WXQWC\/nKTI46EH9WQOM.jpg","dateLastActive":"2023-07-19T19:00:01+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"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\/0YEIMSJ4K8AQ\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-19T18:48:05+00:00","dateAnswered":"2023-07-19T18:46:50+00:00","acceptedAnswers":[{"commentID":386050,"body":"

Your syntax is a bit off. Try this:<\/p>

=IF(COUNTIFS([Expected Draft Submit Date]@row:[Expected Doc Control Master complete]@row, @cell<\/strong> >= TODAY())> 0<\/strong>, \"Overdue\", \"On Schedule\")<\/strong><\/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"},{"tagID":265,"urlcode":"Reports","name":"Reports"},{"tagID":292,"urlcode":"Dashboards","name":"Dashboards"}]}],"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