Countifs with age ranges
Hi. I'm trying to write formula where the age range is 10>= and <=19 yrs old. Here's my formula:
=IFERROR(COUNTIFS({OHCA Form - Agency}, $Agency@row, {OHCA Form - Review Complete}, "Medical Review Complete", {2021 OHCA Form - Etiology}, <>"Trauma", {OHCA Form - Incident Date}, ISDATE(@cell), {OHCA Form - Incident Date}, YEAR(@cell) = $Year@row, {OHCA Form - Incident Date}, MONTH(@cell) = January$1, {2021 OHCA Form - Age}, >="10", {2021 OHCA Form - Age}, <="19"), "--")
When I enter this formula, I receive a 0 but I know there are several for a given month for this date range.
When I used the same formula for age range <=9, it worked. I just can't figure out how to write the formula within an age range. help please?!
Thanks
Adrienne
Answers
-
Try removing the quotes from around 10 and 19. Using quotes is looking for a text value.
-
I have tried removing the quotes around the ages, and then I receive an error message "#unparsible". It's only the ones that have a range.
-
I figured out the issue. There were 2 actually. First was the quotes around the ages. The second was because I had the greater than and equals signs after the age instead of before.
Help Article Resources
Categories
Check out the Formula Handbook template!