Need to count number of days
I need to count the number of days from today to a certain date in a column.
=TODAY() - IF([Assigned Date]@row <> "", [Assigned Date]@row, "0")
This is what I have, I want it to display the zero if there is no date in the assigned date column. I get invalid operation when there is not a date.
Thank you for your help.
Ali
Best Answer
-
Sorry, I copied and pasted your ending and left a parenthesis in there. Try this:
=IF(ISDATE([Assigned Date]@row), TODAY() - [Assigned Date]@row, 0)
Answers
-
Hi @AliT
You can use IF and ISDATE
=IF(ISDATE([Assigned Date]@row),TODAY() - [Assigned Date]@row),"0")
-
Maybe I am copying it wrong but I am getting #unparseable
-
Sorry, I copied and pasted your ending and left a parenthesis in there. Try this:
=IF(ISDATE([Assigned Date]@row), TODAY() - [Assigned Date]@row, 0)
-
Neato, I got the same result using the ISBLANK formula:
=IF(ISBLANK([Assigned Date]@row), 0, [Assigned Date]@row - TODAY())
Cheers,
Ric
-
Thank you KPH!
That did it!!
-
Great @AliT
@Ric T 's ISBLANK will do a similar thing but when it comes to dates I prefer ISDATE as I don't trust anyone 😉 If you write text into a date column the ISBLANK will return an error message, while ISDATE will return the 0 as it knows the text is not a date. You could also use IFERROR to just remove all error messages entirely. There are pros and cons for each - your call!
-
@KPH that's a great point, didn't think about it from that angle. Thanks for sharing!
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!