Auto Fill Formula
I am trying to auto fill a field named "File Name" based on the content in other columns on the same sheet. The tricky part is I need the "File Name" to end in ".jpg" or ".pdf based on what is selected in the 2nd column.
Below is an example of the data and manually filled in the data for my File Name column but that is what I am looking to auto fill/populate instead of manually typing it in. The current formula I was trying to use that isn't working is also below.
=IF([Project Name]@row, "_", Specs@row, "_", IF([Deliverable Type]@row = "Print", ".pdf", ".jpg"))
Any help would be greatly appreciated!
Answers
-
You if statement is: =IF([Deliverable Type]@row = "Print", ".pdf", IF([Deliverable Type]@row = "Digital", ".jpg", ""))
The full deal is:
=[Project Name]@row + "_" + Specs@row + IF([Deliverable Type]@row = "Print", ".pdf", IF([Deliverable Type]@row = "Digital", ".jpg", 999))
-
@James Keuning Thank you! That works perfect.
One additional question. If I need to replace specific symbols that may be listed in the project name and replace them with new symbols how would I do this? For example, in the final file name output I would want to replace every "." with an "-" and every "&" to "_".
Am I able to add this logic to the formula above?
-
This is your final output: SUBSTITUTE(SUBSTITUTE(Filename@row, ".", "-"), "&", "_") + IF([Deliverable Type]@row = "Print", ".pdf", IF([Deliverable Type]@row = "Digital", ".jpg", ""))
You basically add SUBSTITUTE(SUBSTITUTE(Filename@row, ".", "-"), "&", "_") to clean those characters. But you can't add it to the final formula or is will clean the dot before the extension. So you run that operation on the filename, and then add the extension.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!