# Formula that counts based on two variables by month and year

Options

Hi Community,

I was able to find a formula here for counting how many times an employee was assigned to a task by month and date.

=COUNTIFS({Administration and Support Task List Range 3}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2021), {Administration and Support Task List Range 2}, "Employee")

I'd like to take the formula one step further. I have an LOE column with "Low", "Moderate", and "Difficult". I'd like to count the number of LOEs by an employee by month and year.

Thanks,

Doug

• ✭✭✭✭✭✭
Options

You would enter a new range/criteria set in the same syntax as the existing sets.

=COUNTIFS({Administration and Support Task List Range 3}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2021), {Administration and Support Task List Range 2}, "Employee", {Other Sheet LOE Column}, "Low")

• ✭✭✭✭✭✭
Options

You would enter a new range/criteria set in the same syntax as the existing sets.

=COUNTIFS({Administration and Support Task List Range 3}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2021), {Administration and Support Task List Range 2}, "Employee", {Other Sheet LOE Column}, "Low")

• Options

Thank you so much, Paul. It worked. Also, thanks for the previous formula from an earlier post you commented on.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!