Pergunta

I'm trying to create a countif formula on a range of data. I have 4 ranges that I would like to look at. If the age of a certain order is <30 days, 30-59 days, 60-89 days, or greater than 90 days. I would like to create a countif statement that adds the number of orders that fall in each of the ranges and return that count.

Here is what I have right now.

=COUNTIF('Open Sales Orders'!AH2:AH484,"<"&30)

Foi útil?

Solução

Your COUNTIF will work for <30, although I'd write it slightly differently

=COUNTIF('Open Sales Orders'!AH2:AH484,"<30")

and you can do similar for the largest values

=COUNTIF('Open Sales Orders'!AH2:AH484,">=90")

for the between conditions use COUNTIFS (with an "S") which allows multiple conditions, e.g.

=COUNTIFS('Open Sales Orders'!AH2:AH484,">=30",'Open Sales Orders'!AH2:AH484,"<60")

and

=COUNTIFS('Open Sales Orders'!AH2:AH484,">=60",'Open Sales Orders'!AH2:AH484,"<90")

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top