When using excel, how to write equ to count dates.

2006-10-27 5:09 am
When using excel, how to write equ to count total no. of dates (said 1/10/06 to 31/01/06) occurred in the work sheet. Note that they are mixed up with other dates and not in order. Thanks in advance in helping.
更新1:

I have formated the cells aleady. I can count no. of 1/10/06 occurred by using this (COUNTIF(d:d, (datevalue 01/10/06)). However, I cannot do it for 1/10/06 to 31/10/06. Please advise and thanks.

回答 (4)

2006-10-27 7:10 am
✔ 最佳答案
Assume data is A1-A12

=COUNTIF(A1:A12,“<=31/10/2006“)-COUNTIF(A1:A12,“<1/10/2006“)

Count number of date less than 31/10 minus number of date before 1/10
i.e. date between 1/10 and 31/10.

2006-10-27 10:05:33 補充:
Please do not copy and paste the above formula, just retype it in the excel.I found the “ and < in the above formula cannot be recognized in excel if using copy and paste function.
參考: me
2006-10-27 9:44 am
Firstly, change the cells into date format.
asuming that your have two columns, Col A containing the start date in A1, and Col B containing the end date in B1
try to type the following formula in C1
=datedif(A1, B1, "d")
this will calculate the days in between two dates
drag C1 to the columns


Remarks: yahoo 有錯體 d 之前和後有single quotation mark

hope this help
參考: me
2006-10-27 5:45 am
your range in simply contradicting.. what do you mean ??
好多方法..
here is one of the methods..
assume your data named 'date'
assume your start date at A19
assume your end data at A20

=COUNT(data)-COUNTIF(data,">"&A20) - COUNTIF(data,"<"&A19)
參考: --oo-- myself as an excel mania
2006-10-27 5:39 am
What is「equ to count total no. of dates」 means ??

Have you formated your 「Date」style? You try to right click ,Format Cell ,Number ,and then choose 「Date」select what format you need.

「count total no. of dates」, you try to use 「fx」 function and select you need.


收錄日期: 2021-04-30 21:32:51
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20061026000051KK04230

檢視 Wayback Machine 備份