# countif statement

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### cdevaro

I am trying to get an average of the number of entries in a group of cells that are not listed together. I am currently using a sum then a countif statement (advise me if another one would be better) to count the number of entries and divide the sum by the number of the counted entries larger than 1. The cells contain a formula. The problem is the cells are not connected so I need to countif the cells individually. Example:

(A1) (B1) (C1) (D1) (E1)
13 12 countif(A1+C1,">1")

I need to count cells A & C, but not B. This is in several rows of data. Listing the cells separately gives an error.
What do I need to do to count the number of cells that contain numbers?

#### drdrew1469

I think I might understand what you're trying to do... I think.

=SUM(A1:E1)/SUMIF(A1:E1,">1")

Give that a shot. It will sum all of A1:E1 then divide the total by the total of everything >1

ie.

a b c d e
1 2 3 4 5

=15/14

Hope that helps,

Drew

#### drdrew1469

The only other thing I can think that you would want to do would be this:

=SUM(A1:E1)/COUNTIF(A1:E1,">1")

a b c d e
1 2 3 4 5

=15/4

Let me know,

Drew

#### cdevaro

The problem with this is that I don't want to include the data in certain cells. I have different data in consecutive columns for different tickets, but I want to add certain data for several tickets if a ticket is entered.

ticket1 ticket2 ticket3 average
a b c a b c a b c of b

But I may only have two tickets entered.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

As Seen On