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