COUNTIF not Working for Less Than a Year Value

32 Views Asked by At

As shown in the images the COUNTIF statement works for the N/A cells. However, it does not work for less than a specific year (e.g., < 2010 returns 0 even though there are lots of years less than 2010).

I tried formatting the year cells in the "MASTER" sheet as numbers instead of text but this did not help.

Cells containing COUNTIF:

cells containing countif

Reference cells from "MASTER" sheet containing years:

reference cells from 'MASTER' sheet containing years

Example of formula used for years less than 2010:

example of formula used for years less than 2010

1

There are 1 best solutions below

2
Terence Simpson On BEST ANSWER

The cell values are stored as Text, not Numbers. You can generally tell by the left-aligned values in the cell, as well as the fact that the condition isn't working as expected.

I know you said you tried formatting the values as numbers rather than text, but that won't change the existing values in the cells until they're edited.

I often find it useful to copy + paste the column into a plain text editor, then copy + paste back into the sheet with the correct formatting.