INVALID OPERATION error while building a IF/AND formula
I am trying to build a formula that identifies project stages based on where we are date-wise in the project. I started building an embedded IF/AND statement that was looking at each project stage date range and if TODAY's date was in that range it would identify that as the stage. I got an INVALID OPERATION error so scaled down to a single IF statement to check and still got the same error.
I don't see any obvious issues with syntax but would love another pair of eyes.
The formula is reading two date columns and the output column is a dropdown single select.
Here is the simple IF formula: =IF(AND(TODAY() < [Flower End Date]@row, TODAY() >= [Flower Start Date]@row), "Flower", "")
Best Answer
-
I think I was able to fix it, not sure about the diagnosis. I made a copy of the template set and made sure "Restrict to Date Only" was checked in ALL relevant date columns before adding dates. Then I wrote out the full formula, saved it, and then populated the date columns in the project template and the formula was spitting out the correct date.
@Paul Newcome Thank you for your suggestion to evaluate date vs text. Still not sure why the output would be text in a project template... but as long as the problem is fixed, I suppose that is good enough.
Wishing I had control center right about now, this update will take hours. :(
Answers
-
Hi,
That exact formula worked for me; no changes were necessary. Did you double check that your column types are set as Date columns?
-
I just triple-checked, and yes. They are both date columns. I am stumped!
-
How is the [Flower End Date] column being populated exactly?
-
@Paul Newcome both date columns are fed by cell links.
-
Ok. Let's follow those back to the source then. How is the original source data populated, and are those source columns both set as date type columns?
A date type column can house text values, and even though it looks like a date, it may be stored as a text value depending on a number of variables.
-
Paul,
I appreciate the help diagnosing!
Both of the cells are being fed by date columns in a sheet with project settings turned on.
Here are both of the columns the dates are recorded in. I also double-clicked on the date entries to confirm that they are at least superficially being fed as dates.
I also tried checking "restrict to dates only" and reset the dates in the sheet but the error persisted.
Here is a screenshot of one of the date values in the project sheet feeding one of the cell links.
The simplified formula that is giving the INVALID OPERATION ERROR.
-
I think I was able to fix it, not sure about the diagnosis. I made a copy of the template set and made sure "Restrict to Date Only" was checked in ALL relevant date columns before adding dates. Then I wrote out the full formula, saved it, and then populated the date columns in the project template and the formula was spitting out the correct date.
@Paul Newcome Thank you for your suggestion to evaluate date vs text. Still not sure why the output would be text in a project template... but as long as the problem is fixed, I suppose that is good enough.
Wishing I had control center right about now, this update will take hours. :(
-
Glad you were able to get it sorted. 👍️
It may have been just a little bug in the sheet. My next suggestion was going to basically be turning it off then turning it back on again.
Remove formula completely.
Sign out.
Clear browser's cookies and cache.
Log in.
Retype formula.
If that still didn't work it was going to be starting a new sheet over from scratch which is usually the least desirable of options.
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!