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
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!