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