ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   exclude formulas when counting cells (https://www.excelbanter.com/excel-worksheet-functions/198603-exclude-formulas-when-counting-cells.html)

jaydee

exclude formulas when counting cells
 
Is there a "count" formula that will only count the DATE entry in a cell and
exclude the formula in the cell?

A1, A2, A3, A4 have =if(isblank) formulas linked to another file. If a date
auto populates in cell A1 and A4, the count should be 2. However, the
current count formula used in the spreadsheet shows 4 because the formula
counts any data in the 4 cells.

T. Valko

exclude formulas when counting cells
 
To count DATES use the COUNT function. Dates are just numbers formatted to
look like dates.

=COUNT(A1:A4)

Note that this will count *all* numbers, not just the "dates".

A1 = 8/12/2008
A2 = 10
A3 = 37
A4 = 9/27/2002

=COUNT(A1:A4) = 4

If you only want the "dates" counted then you'd have to narrow down the
dates to a range so that the result would exclude entries like A2 and A3.

--
Biff
Microsoft Excel MVP


"JayDee" wrote in message
...
Is there a "count" formula that will only count the DATE entry in a cell
and
exclude the formula in the cell?

A1, A2, A3, A4 have =if(isblank) formulas linked to another file. If a
date
auto populates in cell A1 and A4, the count should be 2. However, the
current count formula used in the spreadsheet shows 4 because the formula
counts any data in the 4 cells.




jaydee

exclude formulas when counting cells
 
Please provide an example to only count the cells with dates. I was using
the count function but it counts the cell if there is a date or text or
number in the cell. So my count was incorrect when I added the IF formulas
to the cells.

"T. Valko" wrote:

To count DATES use the COUNT function. Dates are just numbers formatted to
look like dates.

=COUNT(A1:A4)

Note that this will count *all* numbers, not just the "dates".

A1 = 8/12/2008
A2 = 10
A3 = 37
A4 = 9/27/2002

=COUNT(A1:A4) = 4

If you only want the "dates" counted then you'd have to narrow down the
dates to a range so that the result would exclude entries like A2 and A3.

--
Biff
Microsoft Excel MVP


"JayDee" wrote in message
...
Is there a "count" formula that will only count the DATE entry in a cell
and
exclude the formula in the cell?

A1, A2, A3, A4 have =if(isblank) formulas linked to another file. If a
date
auto populates in cell A1 and A4, the count should be 2. However, the
current count formula used in the spreadsheet shows 4 because the formula
counts any data in the 4 cells.





T. Valko

exclude formulas when counting cells
 
the count function but it counts the cell if there
is a date or text or number in the cell.


COUNT *does not* count text. You may be thinking of COUNTA which will count
all cells that are not empty. That includes text, numbers, errors, logicals,
formula blanks.

Using this example to count only the dates:

A1 = 8/12/2008
A2 = 10
A3 = 37
A4 = 9/27/2002

=SUMPRODUCT(--(A1:A410000))

The logic is based on the fact that I know for certain:

There will be no dates earlier than January 1 1980
There will be no numbers greater than 100


--
Biff
Microsoft Excel MVP


"JayDee" wrote in message
...
Please provide an example to only count the cells with dates. I was using
the count function but it counts the cell if there is a date or text or
number in the cell. So my count was incorrect when I added the IF
formulas
to the cells.

"T. Valko" wrote:

To count DATES use the COUNT function. Dates are just numbers formatted
to
look like dates.

=COUNT(A1:A4)

Note that this will count *all* numbers, not just the "dates".

A1 = 8/12/2008
A2 = 10
A3 = 37
A4 = 9/27/2002

=COUNT(A1:A4) = 4

If you only want the "dates" counted then you'd have to narrow down the
dates to a range so that the result would exclude entries like A2 and A3.

--
Biff
Microsoft Excel MVP


"JayDee" wrote in message
...
Is there a "count" formula that will only count the DATE entry in a
cell
and
exclude the formula in the cell?

A1, A2, A3, A4 have =if(isblank) formulas linked to another file. If a
date
auto populates in cell A1 and A4, the count should be 2. However, the
current count formula used in the spreadsheet shows 4 because the
formula
counts any data in the 4 cells.








All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com