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.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!