Unique codes
Hey all,
I am trying to create a system that will check a unique code that is entered through a form and display if this code has been used already or not.
I have a formula in the summary sheet that will asses if the code has been used or not:
=VLOOKUP($Code$1, {Z Codes Trial Database Range 1}, 3, 0)
The problem is that I would like the formula to always check the most recent entry but the formula changes when a new row is added at the top of the sheet even though its locked.
Is there a way to lock the formula even when a new row is added?
Any other ideas on how to build a unique code system in Smartsheet would be great.
Thank you,
Itai Perez
If you found my comment helpful any reaction, Insightful, Awsome etc... would be appreciated🙂
https://www.linkedin.com/in/itai-perez/
Best Answers
-
Try nesting in an INDEX function with a specified row of 1.
=VLOOKUP(INDEX(Code:Code, 1), {Cross Sheet Reference}, .......)
-
Try using INDEX(Code:Code, 1) instead of $Code$1
Note: Also, I would recommend you use INDEX/MATCH instead of VLOOKUP. Much more reliable.
I hope this helps you.
Smartsheet Solutions Architect
www.adapture.com
Answers
-
Try nesting in an INDEX function with a specified row of 1.
=VLOOKUP(INDEX(Code:Code, 1), {Cross Sheet Reference}, .......)
-
Try using INDEX(Code:Code, 1) instead of $Code$1
Note: Also, I would recommend you use INDEX/MATCH instead of VLOOKUP. Much more reliable.
I hope this helps you.
Smartsheet Solutions Architect
www.adapture.com
-
Itai Perez
If you found my comment helpful any reaction, Insightful, Awsome etc... would be appreciated🙂
https://www.linkedin.com/in/itai-perez/
-
The challenge with VLOOKUP is it specifies a column number. If you change the column order or add a column to the reference sheet, it could throw off your formula and return incorrect information.
Smartsheet Solutions Architect
www.adapture.com
-
Happy to help. 👍️
INDEX/MATCH is better than VLOOKUP for a number of reasons that come from the ability to reference only the two columns needed. First it allows for more flexibility because by referencing the columns individually, it doesn't matter what order they are in.
It also reduces the number of cells being referenced by cross sheet references (potentially) because you do not need to reference every column in between the two columns you want to reference. This has the added (potential) benefit of better performance since you are only referencing two columns instead of the entire sheet.
-
Its time Smartsheet added Xlookup :)
Itai Perez
If you found my comment helpful any reaction, Insightful, Awsome etc... would be appreciated🙂
https://www.linkedin.com/in/itai-perez/
-
@Itai How is XLOOKUP any different than an IFERROR/INDEX/MATCH?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!