Combine column with static URL
I know there is an answer out there in the community for what I want to do but I am not quite sure what I need to search to find it.
I want to use a formula to create a custom URL. The beginning of the URL is always the same but the ending will change. So for example, I want everything to start with www.google.com/ and then we would add a number from another column on to the end so it ends up as www.google.com/12345678. What is the formula to make this happen?
Additionally to make it more complicated, is there a way to make that beginning of the URL change depending on what is selected in yet another column AND add on that variable column cell from above?? So for example, if Food is selected in one column, the formula would make the url www.google.food.com/12345678 but if drink is selcted, it would make the formula www.google.drink.com/12345678. We would only have 3 drop down options so it isnt open ended.
Best Answer
-
Ah, you need to change the domain name based on the food item. This can be done with IF statements
=IF([Item]@row = "Drink", "https://www.google." + [Item]@row + ".com/" + [URL Variable]@row, IF([Item]@row = "Food", "https://www.yahoo." + [Item]@row + ".com/" + [URL Variable]@row))
Sincerely,
Jacob Stey
Answers
-
Try this:
="https://www.google." + [Food Item]@row + ".com/" + [URL Variable]@row
Sincerely,
Jacob Stey
-
This worked perfect for the 1st question I was looking for! Thanks!
Now is there a way to change it based on what dropdown option is selected? Would I need to add "If" statements?
-
when you change the dropdown, it will automatically change the URL available. You may have to save the sheet first -- but it will automatically update.
This kind of formula is especially useful if you convert it to a column formula, where you can have multiple rows referencing different variables, and different food items.
Sincerely,
Jacob Stey
-
You answered exactly what I was asking. So let me change the way I ask. Lets say that if I choose drinks, the URL that populates is www.google.com. IF I choose food, the url that populates is www.yahoo.com. Can I get that sort of an output if the specific URL isnt being selected in the dropdown?
-
Ah, you need to change the domain name based on the food item. This can be done with IF statements
=IF([Item]@row = "Drink", "https://www.google." + [Item]@row + ".com/" + [URL Variable]@row, IF([Item]@row = "Food", "https://www.yahoo." + [Item]@row + ".com/" + [URL Variable]@row))
Sincerely,
Jacob Stey
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 348 Global Discussions
- 199 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!