• Status: Solved
• Priority: Low
• Security: Public
• Views: 62

# if statement

hi experts, id like a formula in excel that adds 1 for every entry in a column, please see below

due dates
5/12
6/12
1/12
5/12
6/12
4/12
5/12

total     x7      (so if there is an entry in the column cell, it needs to add 1 and then sum the total for the column, in this case there are 7 entries, therefore the sum total = 7)
0
Frank .S
1 Solution

Mr.Commented:
Why don't you use =COUNT(A1:A7)
1

Building EstimatorAuthor Commented:
thanks oddywriter!
0

Finance AnalystCommented:
There are a number of different COUNT functions that may be of use:

=COUNT(A1:A7)   counts cells in the range that are numbers. With your sample above this may not work as the cell contents as shown are not numbers. If they are dates and formatted as "dd/mm" it will still work as dates are just a serial number for number of days since 01 Jan 1900

=COUNTA(A1:A7)   counts cells in the range that are not empty. Be aware, even a cell containing just a space will be counted although you will not see the cell as being populated.

=COUNTBLANK(A1:A7)   the opposite to COUNTA, this will count those cells that are empty.

=COUNTIF(A1:A7,"x")   this counts the number cells in the range that meet one criteria specified. the criteria can be a number or text string or a calculated value.

=COUNTIFS("x-range","x","y-range","y")   this counts the number cells in the range that meet multiple criteria specified.

Thanks
Rob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.