How to reference column name pulled from formula

I'm trying to pull a date from columns based on the number in the helper column. I know I can do this with nested IFs, but is there a way to change which column I'm pulling the value from?

My column Start Date should be whatever the column is based on the Index. So for the first column below, since Index is 3, it should pull the value from Day 0 Start3 Date. Instead, it's pulling the text "Day 0 Start3 Date". Can I have the column name be used as a string instead of text?


="[" + INDEX([Index Date Row]:[Index Date Row], MATCH([email protected], [Index Lookup]:[Index Lookup], 1)) + "]@row"

image.png

Thanks!

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    Are you trying to use that as a dynamic cell reference? If so, that is not possible. What it looks to me like you need is something more along the lines of

    =INDEX([1st Date Column]@row:[Last Date Column]@row, 1,[email protected])


    You are going to need to update the column names in the formula to match what you are using in your sheet.

    thinkspi.com

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
You should be able to do that in automation. There is a template called \"Record the date when specified criteria are met\"<\/strong> and if you use that, you can record a date when a the checkbox field is checked.<\/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":319,"urlcode":"functionality","name":"functionality"}]},{"discussionID":106229,"type":"question","name":"Invalid Data Type - trying to return 1 value for multiple field scenarios","excerpt":"Here's the formula that is currently returning the Invalid Data Type error...haven't had much experience writing more advanced or nested formulas so welcome any help! =IF(AND([Build Approved]@row = 1, \"Build Approved\", \"Design\"), IF(AND([Install Complete]@row = 1, \"Installed\", \"Build Approved\")), IF(AND([In Production]@row…","categoryID":322,"dateInserted":"2023-06-08T19:33:43+00:00","dateUpdated":null,"dateLastComment":"2023-06-08T20:33:35+00:00","insertUserID":162220,"insertUser":{"userID":162220,"name":"dhawkins","title":"Product Manager","url":"https:\/\/community.smartsheet.com\/profile\/dhawkins","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-08T21:34:13+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-06-08T20:32:42+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":37,"score":null,"hot":3372511638,"url":"https:\/\/community.smartsheet.com\/discussion\/106229\/invalid-data-type-trying-to-return-1-value-for-multiple-field-scenarios","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106229\/invalid-data-type-trying-to-return-1-value-for-multiple-field-scenarios","format":"Rich","lastPost":{"discussionID":106229,"commentID":379720,"name":"Re: Invalid Data Type - trying to return 1 value for multiple field scenarios","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/379720#Comment_379720","dateInserted":"2023-06-08T20:33:35+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-06-08T20:32:42+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-08T19:55:54+00:00","dateAnswered":"2023-06-08T19:47:07+00:00","acceptedAnswers":[{"commentID":379708,"body":"

@dhawkins<\/a> Try the formula below and let me know if that works. The AND function is a comma separated list of conditions, and always returns only True or False. <\/p>

=IF(AND([Build Approved]@row = 1, [Install Complete]@row = 1, [In Production]@row = 1), \"In Production\", IF(AND([Build Approved]@row = 1, [Install Complete]@row = 1, [In Production]@row = 0), \"Installed\", IF(AND([Build Approved]@row = 1, [Install Complete]@row = 0, [In Production]@row = 0), \"Build Approved\", \"Design\")))<\/p>"},{"commentID":379709,"body":"

=IF([Build Approved]@row = 0, \"Design\", IF([Install Complete]@row = 0, \"Build Approved\", IF([In Production]@row = 0, \"Installed\", \"In Production\")))<\/p>

This may work.<\/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":106219,"type":"question","name":"Metrics NOT updating periodically as expected","excerpt":"Not sure if anyone is experiencing this. I've created a METRICS sheet for every project that sums up counts for Task Health in order to present on Dashboard through Graphs. I'm noticing that theses metrics are NOT automatically updated unless I refresh the page a dozen times OR re-write the exact same formula again. But…","categoryID":322,"dateInserted":"2023-06-08T17:33:54+00:00","dateUpdated":null,"dateLastComment":"2023-06-08T21:33:47+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-06-08T21:32:12+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":161931,"lastUser":{"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-06-08T21:32:12+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":39,"score":null,"hot":3372508061,"url":"https:\/\/community.smartsheet.com\/discussion\/106219\/metrics-not-updating-periodically-as-expected","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106219\/metrics-not-updating-periodically-as-expected","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106219,"commentID":379733,"name":"Re: Metrics NOT updating periodically as expected","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/379733#Comment_379733","dateInserted":"2023-06-08T21:33:47+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-06-08T21:32:12+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\/FUCVWKMTVZVX\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-08T21:32:09+00:00","dateAnswered":"2023-06-08T21:03:22+00:00","acceptedAnswers":[{"commentID":379727,"body":"

Hi @Christine Cao<\/a> <\/p>

No problem. Add a date column (and probably hide it). Then go the Automations button on the upper left of the sheet. From there, create new from scratch. I called my automation the same as the column I added; \"TODAY (sheet refresh)\". Below is how my settings are for the automation. I hope that does the trick. -Matt<\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n


<\/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"}]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Formulas and Functions