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.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!