ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculate number of days in a column of dates (https://www.excelbanter.com/excel-discussion-misc-queries/27685-calculate-number-days-column-dates.html)

Barbara

Calculate number of days in a column of dates
 
Hi again,

I still have a problem!!! In this list, with your formula, it returns 16
days. But the right answer is 14. Why? How can I have the right answer?
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
03-Dez
07-Dez
07-Dez
09-Dez
10-Dez
10-Dez
13-Dez
13-Dez
13-Dez
14-Dez
14-Dez
15-Dez
15-Dez
15-Dez
15-Dez
16-Dez
16-Dez
17-Dez
17-Dez
17-Dez
20-Dez
20-Dez
21-Dez
21-Dez
21-Dez
21-Dez
21-Dez
22-Dez
22-Dez
23-Dez
23-Dez

Barb R.

What was the original question?

"Barbara" wrote:

Hi again,

I still have a problem!!! In this list, with your formula, it returns 16
days. But the right answer is 14. Why? How can I have the right answer?
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
02-Dez
03-Dez
07-Dez
07-Dez
09-Dez
10-Dez
10-Dez
13-Dez
13-Dez
13-Dez
14-Dez
14-Dez
15-Dez
15-Dez
15-Dez
15-Dez
16-Dez
16-Dez
17-Dez
17-Dez
17-Dez
20-Dez
20-Dez
21-Dez
21-Dez
21-Dez
21-Dez
21-Dez
22-Dez
22-Dez
23-Dez
23-Dez


swatsp0p


Try this (as I don't see your original post with the given formula):

=SUMPRODUCT((A7:A45<"")/COUNTIF(A7:A45,A7:A45&"")) where your data is
in the range A7:A45 -- adjust as needed.

Good Luck


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=373871


Donkin


Hi Barbara


Convert the date to the Excel number format by using format - number


Date Number Format =IF(A2-A10,1,0)


A B C
Blank Line......................................
2-Dec 38688 1
2-Dec 38688 0
2-Dec 38688 0
2-Dec 38688 0
2-Dec 38688 0
2-Dec 38688 0
2-Dec 38688 0
2-Dec 38688 0
3-Dec 38689 1
7-Dec 38693 1
7-Dec 38693 0
9-Dec 38695 1
10-Dec 38696 1
10-Dec 38696 0
13-Dec 38699 1
13-Dec 38699 0
13-Dec 38699 0
14-Dec 38700 1
14-Dec 38700 0
15-Dec 38701 1
15-Dec 38701 0
15-Dec 38701 0
15-Dec 38701 0
16-Dec 38702 1
16-Dec 38702 0
17-Dec 38703 1
17-Dec 38703 0
17-Dec 38703 0
20-Dec 38706 1
20-Dec 38706 0
21-Dec 38707 1
21-Dec 38707 0
21-Dec 38707 0
21-Dec 38707 0
21-Dec 38707 0
22-Dec 38708 1
22-Dec 38708 0
23-Dec 38709 1
23-Dec 38709 0

=SUM(c1:c 40) Gives 14.00

Hope it helps

Donkin


--
Donkin
------------------------------------------------------------------------
Donkin's Profile: http://www.excelforum.com/member.php...o&userid=23715
View this thread: http://www.excelforum.com/showthread...hreadid=373871



All times are GMT +1. The time now is 01:14 AM.

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