Null in IF condition

How do I represent null in the else clause of if statement? A blank pair of double quotes ("") is not working. I want to concatenate values is a few columns if a column is not blank. If the column is blank, I want the if statement to return null.
This code works, but I want the value in "SEQ#" to be left padded with zeros for up to 2 digits.
I want the final value in the cell to be, for example: "JD-18-01" and not "JD-18-1".
=IF(NOT(ISBLANK([Story summary]@row)), [Assigned To]@row + "-" + [Sprint#]@row + "-") + [Seq#]@row
Answers
-
Essentially, there are two issues here.
- The value of the last column to be 01 instead of 1 (for example "JD-18-01" and not "JD-18-1".
- If the value in [Story Summary]@row is blank, do not populate anything, in other words, leave it blank.
-
Solving for #2 first is as simple as moving that closing parenthesis after the second "-" to the very end of the formula:
=IF(NOT(ISBLANK([Story summary]@row)), [Assigned To]@row + "-" + [Sprint#]@row + "-" + [Seq#]@row)
Solving for #1 requires a RIGHT statement that looks like this:
=IF(NOT(ISBLANK([Story summary]@row)), [Assigned To]@row + "-" + [Sprint#]@row + "-" + RIGHT("0" + [Seq#]@row, 2))
-
Thanks, Paul. That works great. I will try to understand how it works. I did not expect RIGHT function to work here. Thanks again.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 205 Use Cases
- 516 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!