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.
-
Is it set to a date type column?
-
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!!
-
Happy to help! 👍️
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!