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.

Reference Row Number?

BMar
BMar
edited 12/09/19 inArchived 2016 Posts

I'm building a task management sheet that prioritizes tasks by their order on the sheet. A formula calculates lead time of a task based on its current position in the list. Is there a way to dynamically reference the row number of a task?

Theeasiestway would be a function that references the row number (since those update dynamically as a row is dragged to a new location), but this seems not to exist yet.

I have accomplished this in Excel by using the OFFSET function to look at the value of the cell directly above the current cell (=[previous cell] + 1), but Smartsheet doesn't have that either. In fact I can't find any way to reference a cell's location, its neighbors (apart from parents/children), or the current cell in general.

Has anybody found a way of dealing with this? Auto-numbering columns won't work because the cell values do not change once created. Also, I don't want to create a chain of parent/child relationships.

Comments

  • You're correct in that aside from Parent/Children, there isn't a way to reference a cell location based on relation to the function. The closest I could imagine would be to use the $ symbol to make the cell reference absolute, so it always references the cell above it regardless of whether rows move or not. You can find details on Using Formulas in Smartsheet in our Help Center:http://help.smartsheet.com/articles/775363-using-formulas

    I'll pass your feedback to our Product team for a way to reference based on relational location.

  • BMar
    BMar
    edited 10/20/16

    Thanks, Shaine! I'll have many uses for that if it is developed.

    Please also ask about a way to reference the row number (from the draggable shaded cell on the left). That would be the easiest and most computationally efficient way to solve this specific problem.

  • Formulas rely on the row number as well as column name when referencing cells:

    =[Column Name]1 + [Other Column]1

    Considering this hypothetical formula, if I were to move row 1, the formula would dynamically update to the new row number. If I move the row containing the formula, it will still reference the expected row number.

    What we don't yet have in Smartsheet is a way to reference the row above without manually typing in the column name and row number.

  • I think I found a way to accomplish what I need.

    I created a hidden column called "index" in which every cell contains the value of 1. In a separate column called "Priority" I placed this formula:

    =SUM(index$1:index1)

    Drag the formula down to auto-fill the column and the last row number (shown in bold) increments for each row. Now when a row is dragged to a new position in the list the number in bold refreshes to reflect its new position.

  • Glad you found a solution!

  • The SmartsSheets have row numbers automatically, it's the first column -- followed by the system rows for actions, attachments, comments and locks; can we just reference the first system row for the row numbers that are already there? Creating an index row in addition to the system row seems redundant.

  • Has a Neighbor() function been made yet? Seeing as it has been 2 years since this problem was reported I can't find anywhere else online that solves the issue without going through the hidden index solution.

    If not, then I suggest that you make it a hierarchy where it has to be reference inside a function to work. Here is the format I suggest:

    Where if [Enter Number] is apositivevalue, the function will start from where the [Specific Cell] will goupthe exact number of spaces that the [Enter Number] equals. If [Enter Number] is anegativevalue, it will godownfrom where the [Specific Cell] is [Enter Number] amount of times.

    =FUNCTION(NEIGHBOR([Specific Cell], [Enter Number] ))

    Another solution is to, instead of basing of whether the number is positive or negative to see which direction it goes, using a boolean instead. Where true is up and false is down.

    =FUNCTION(NEIGHBOR([Specific Cell], Boolean, [Enter Number]))

    Please make this a thing, it would help me out so much.

This discussion has been closed.
Try a DATE function:<\/p>

=(NETDAYS([Requested Start Date]@row, DATE(2022, 12, 1)<\/strong>) \/ 365) * 12<\/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":107082,"type":"question","name":"Automatic Update of Dropdown List?","excerpt":"I saw several discussions on this and I'm wondering if there is a formula or an easy way without a 3rd party to automatically update a dropdown list based on a cell in one sheet? I can create a helper sheet if that would help. Any ideas? I don't believe I have the premium Smartsheets plan. Thank you! Lori","snippet":"I saw several discussions on this and I'm wondering if there is a formula or an easy way without a 3rd party to automatically update a dropdown list based on a cell in one sheet?…","categoryID":322,"dateInserted":"2023-06-29T14:16:13+00:00","dateUpdated":null,"dateLastComment":"2023-06-29T17:23:25+00:00","insertUserID":162337,"insertUser":{"userID":162337,"name":"maineL","title":"Admin. & Course Coordinator","url":"https:\/\/community.smartsheet.com\/profile\/maineL","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!plNXqQdBs_o!2kvQ_7y42f4!PTHvB33mICN","dateLastActive":"2023-06-29T16:57:17+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-29T17:19:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":9,"countViews":38,"score":null,"hot":3376112978,"url":"https:\/\/community.smartsheet.com\/discussion\/107082\/automatic-update-of-dropdown-list","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107082\/automatic-update-of-dropdown-list","format":"Rich","lastPost":{"discussionID":107082,"commentID":383162,"name":"Re: Automatic Update of Dropdown List?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/383162#Comment_383162","dateInserted":"2023-06-29T17:23:25+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-29T17:19:40+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-29T14:52:00+00:00","dateAnswered":"2023-06-29T14:50:26+00:00","acceptedAnswers":[{"commentID":383100,"body":"

@maineL<\/a>,<\/p>

I haven't seen this possible without the use of a 3rd party integration. I don't believe it is supported natively in Smartsheet. The question comes up all the time though. <\/p>

BRgds,<\/p>

-Ray<\/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":107086,"type":"question","name":"Converting a date in a text type to Date type","excerpt":"Hi, I have a column as text\/number type with date value such as '2023-06-27 09:02:53' and I want to have another column and convert it to DATE column type. e.g \"Date as Text Type\" column is a text\/number field. I want to convert this to DATE and put in the \"Date as DateType\" column. is there a way to do it?","snippet":"Hi, I have a column as text\/number type with date value such as '2023-06-27 09:02:53' and I want to have another column and convert it to DATE column type. e.g \"Date as Text Type\"…","categoryID":321,"dateInserted":"2023-06-29T15:24:02+00:00","dateUpdated":null,"dateLastComment":"2023-06-29T16:10:10+00:00","insertUserID":64466,"insertUser":{"userID":64466,"name":"sushilp","url":"https:\/\/community.smartsheet.com\/profile\/sushilp","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!!bCFWG3XASHo!HXjWn2mniiQ!_myWsvAATx0","dateLastActive":"2023-06-29T16:04:52+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":64466,"lastUser":{"userID":64466,"name":"sushilp","url":"https:\/\/community.smartsheet.com\/profile\/sushilp","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!!bCFWG3XASHo!HXjWn2mniiQ!_myWsvAATx0","dateLastActive":"2023-06-29T16:04:52+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":26,"score":null,"hot":3376108452,"url":"https:\/\/community.smartsheet.com\/discussion\/107086\/converting-a-date-in-a-text-type-to-date-type","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107086\/converting-a-date-in-a-text-type-to-date-type","format":"Rich","lastPost":{"discussionID":107086,"commentID":383133,"name":"Re: Converting a date in a text type to Date type","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/383133#Comment_383133","dateInserted":"2023-06-29T16:10:10+00:00","insertUserID":64466,"insertUser":{"userID":64466,"name":"sushilp","url":"https:\/\/community.smartsheet.com\/profile\/sushilp","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!!bCFWG3XASHo!HXjWn2mniiQ!_myWsvAATx0","dateLastActive":"2023-06-29T16:04:52+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":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/P0PQ2RQRRSC5\/date-conversion-jpg.jpg","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Date conversion.JPG"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-29T16:09:01+00:00","dateAnswered":"2023-06-29T15:45:28+00:00","acceptedAnswers":[{"commentID":383125,"body":"

You will need to make sure your [Date as DateType] column is formatted as Date. This also assumes your [Date as Text Type] column is always in the same format. (Starts with full 10 digit date)<\/p>

=IF([Date as Text Type]@row <> \"//m.santa-greenland.com/community/discussion/comment/\", DATE(VALUE(LEFT([Date as Text Type]@row, 4)), VALUE(MID([Date as Text Type]@row, 6, 2)), VALUE(MID([Date as Text Type]@row, 9, 2))), \"//m.santa-greenland.com/community/discussion/comment/\")<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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&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