# Adding the year into a formula

✭✭✭

Hello

Please can someone assist me with the following formula? I need to add the year in so that it isn't adding up everything in February each year. I need it to return the year 2021, 2022 and so on (not only the 'current' year).

=COUNTIFS({IMS005.03 Incident, Near Miss and Hazard R Range 2}, "Yes", {IMS005.03 Incident, Near Miss and Hazard R Range 4}, IFERROR(MONTH(@cell), 0) = 2)

## Best Answer

• ✭✭✭✭✭✭
Answer ✓

Hi @Melanie Paff do you have a snapshot of the sheet and data? Otherwise, can you add a third range & criteria?

=COUNTIFS({IMS005.03 Incident, Near Miss and Hazard R Range 2}, "Yes", {IMS005.03 Incident, Near Miss and Hazard R Range 4}, IFERROR(MONTH(@cell), 0) = 2, {IMS005.03 Incident, Near Miss and Hazard R Range 4}, IFERROR(YEAR(@cell), 0) = 2022 etc.

## Answers

• ✭✭✭✭✭✭
Answer ✓

Hi @Melanie Paff do you have a snapshot of the sheet and data? Otherwise, can you add a third range & criteria?

=COUNTIFS({IMS005.03 Incident, Near Miss and Hazard R Range 2}, "Yes", {IMS005.03 Incident, Near Miss and Hazard R Range 4}, IFERROR(MONTH(@cell), 0) = 2, {IMS005.03 Incident, Near Miss and Hazard R Range 4}, IFERROR(YEAR(@cell), 0) = 2022 etc.

• ✭✭✭

This is perfect - thank you!!!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!