If, then formula help
I need to replace the first 4 characters in a text string if the range has any of the criteria.
="0000" + "-" + [Function Code]@row + "-" + [Dept Code]@row + "-" + [Object Code]@row + "-" + SubObject
above is my current formula and an example of the output code is: 0000-10-3459-4500-4502
so...
0000" if column SP Code and Column AG Code are both blank but Dept Code is not blank
"0010" if column SP Code is not blank but AG Code and Dept Code are blank
"0080" if column AG Code is not blank but SP & Dept Codes are blank
Answers
-
Substitute may help you here.
School of Sheets (Smartsheet Partner)
If my answer helped please accept and react w/💡Insightful, ⬆️ Vote Up, ❤️Awesome!
-
thank you!
-
=IF(AND(ISBLANK(SP@row), ISBLANK(AG@row), NOT(ISBLANK(Dept@row))), "0000",
IF(AND(ISBLANK(AG@row), ISBLANK(Dept@row), NOT(ISBLANK(SP@row))), "0010",
"0080"))
...
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!