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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!