Countifs and Contains (Name & Date)
Hello All!
A bit of a tricky one here - I am trying to COUNT the amount of times a person has an item for each month. The problem is when I use CONTAINS and select the month it shows anywhere that number shows.
For example, I am trying to find each time a person has something with a date of anytime in August (8).. when I use 8 it collects other dates like 7/08/20 but I don't want JULY I only want August.
Any thoughts?!?
=COUNTIFS({Name}, Name@row, {Lease Move in Log Range 1}, FIND("8", @cell) > 0)
Best Answer
-
Use a date formula instead. I don't know what your source sheet looks like, but try:
=COUNTIFS({Name}, Name@row, {Lease Move in Log Range 1}, IFERROR(MONTH(@cell), 0) = 8)
If you have more than one year in your sheet, this will not reference the year. It will count all entries with 8 as the month regardless of year. If you need a year breakdown as well, use this one:
=COUNTIFS({Name}, Name@row, {Lease Move in Log Range 1}, AND(IFERROR(YEAR(@cell), 0) = 2020, IFERROR(MONTH(@cell), 0) = 8))
Answers
-
Use a date formula instead. I don't know what your source sheet looks like, but try:
=COUNTIFS({Name}, Name@row, {Lease Move in Log Range 1}, IFERROR(MONTH(@cell), 0) = 8)
If you have more than one year in your sheet, this will not reference the year. It will count all entries with 8 as the month regardless of year. If you need a year breakdown as well, use this one:
=COUNTIFS({Name}, Name@row, {Lease Move in Log Range 1}, AND(IFERROR(YEAR(@cell), 0) = 2020, IFERROR(MONTH(@cell), 0) = 8))
-
IT WORKED!! THANK YOU SO MUCH!
-
You are welcome!! Glad I could 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!