Date Range Formula

Hi!
I'm trying to say: If a date in one cell is between April 1, 2020 and June 30, 2020, then return "Q2" in this new cell and if there is no date listed, return nothing in this new cell.
What is wrong with my formula?
=IF([Date Visited]@row, <=DATE(2020, 4, 1) >= DATE(2020, 6, 30), ="Q2", 0)
Best Answer
-
I just took another look at the formula. I had adjusted the syntax without actually looking at what it was saying. Try switching your greater than and less than signs around.
Answers
-
You will want to use an AND statement to combine the two sets of criteria.
=IF(AND([Date Visited]@row <=DATE(2020, 4, 1), [Date Visited]@row >= DATE(2020, 6, 30)), "Q2", 0)
-
Thank you! Now I'm not getting a formula error but when I type in a date 4/2/20 for example, my cell says 0 instead of Q2.
-
-
My date visited column is set up as a date column. The column where I'm adding the formula (my Quarter completed column) is set as text/number
-
I just took another look at the formula. I had adjusted the syntax without actually looking at what it was saying. Try switching your greater than and less than signs around.
-
Oh duh. Thank you as always!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 203 Use Cases
- 515 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 82 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!