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
- 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!