Help with formula if cell is blank
I'm using the following formula to piece together a date in a text/number cell:
=IF(MONTH([Sale Date Form]@row) < 10, "0") + MONTH([Sale Date Form]@row) + "-" + IF(DAY([Sale Date Form]@row) < 10, "0") + DAY([Sale Date Form]@row) + "-" + YEAR([Sale Date Form]@row)
It's working great, unless the "Sale Date Form" cell is blank, then I get an "Invalid Data Type" error.
Please help with adding logic to this that leaves this cell blank if "Sale Date Form" is blank.
Thanks in advance!
Comments
-
Hi,
Have you tried adding an IFERROR function at the beginning of the formula?
Hope that helps!
Have a fantastic week!
Best,
Andrée Starå
Workflow Consultant @ Get Done Consulting
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Good morning!
Yes, I have tried that by adding it to the beginning of the formula but that doesn't seem to help (just end up with invalid operation). I'm sure it's user error!
Thoughts?
-
Good afternoon!
Can you maybe share the sheet(s) or some screenshots? That would make it easier to help. (share too, andree@getdone.se)
Best,
Andrée
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
I shared the sheet with you just now and here's a screenshot. Thanks again!
-
Andree,
Were you able to get this up and running? I was thinking of a few different ways...
The IFERROR
=IFERROR(IF(MONTH([Sale Date Form]@row) < 10, "0") + MONTH([Sale Date Form]@row) + "-" + IF(DAY([Sale Date Form]@row) < 10, "0") + DAY([Sale Date Form]@row) + "-" + YEAR([Sale Date Form]@row), "")
or the IF(ISBLANK(
=IF(ISBLANK([Sale Date Form]@row), "", IF(MONTH([Sale Date Form]@row) < 10, "0") + MONTH([Sale Date Form]@row) + "-" + IF(DAY([Sale Date Form]@row) < 10, "0") + DAY([Sale Date Form]@row) + "-" + YEAR([Sale Date Form]@row))
or the IF(ISDATE(
=IF(ISDATE([Sale Date Form]@row), IF(MONTH([Sale Date Form]@row) < 10, "0") + MONTH([Sale Date Form]@row) + "-" + IF(DAY([Sale Date Form]@row) < 10, "0") + DAY([Sale Date Form]@row) + "-" + YEAR([Sale Date Form]@row), "")
-
Paul,
Yes, I was!
I added an IF to check if it was empty with "" at the beginning of the formula.
Best,
Andrée
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
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!