Chủ nhật là cuối tuần hay là đầu tuần???

Liên hệ QC

ST-Lu!

Love Wingchun
Tham gia
19/8/08
Bài viết
730
Được thích
546
Nghề nghiệp
Xích lô một thời
Em đang dùng công thức weeknum()
Ví dụ: weeknum(18/04/09) = 16, nhưng weeknum(19/04/09) lại bằng 17, mặc dù 19/04 là chủ nhật

Em xin được chỉ giáo
 
error-toolpack.jpg


Thưa Anh
Khi em dùng hàm Weeknum() thì phải chạy thêm add-in (Analysis Toolpak) nhưng khi chạy nó có thông báo như trên và không thể chạy được??

Xin các anh chỉ giúp
 
error-toolpack.jpg


Thưa Anh
Khi em dùng hàm Weeknum() thì phải chạy thêm add-in (Analysis Toolpak) nhưng khi chạy nó có thông báo như trên và không thể chạy được??

Xin các anh chỉ giúp
Cho đĩa CD vào bạn ơi!
Nếu cẩn thận thì bấm thêm nút Browse, tìm đến file PRO011.MSI trong CD rồi OK và... chở chút
 
Thưa Anh
Khi em dùng hàm Weeknum() thì phải chạy thêm add-in (Analysis Toolpak) nhưng khi chạy nó có thông báo như trên và không thể chạy được??

Xin các anh chỉ giúp

Nếu bạn có bộ cài đặt ngay trên máy tính thì có thể Browse đến thư mục chứa bộ cài đặt đó để cài thêm Add-in.
 
Theo tập quán của ta thì thứ 2 mới là ngày đầu tuần (đã có hẳn một bào hát như thế cơ mà).
Còn Tây thì cho rằng chủ nhật là ngày đầu tuần (hàm WEEKDAY() của excel cho kết quả Sunday ứng với số 1 đấy thôi).
Kết luận: tùy theo hoàn cảnh chứ biết làm sao.
Vài lời mạn đàm, có gì không đúng xin Bác chỉ giúp.
 
WEEKDAYWEEKDAY

See Also
Returns the day of the week corresponding to a date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday), by default.
Syntax
WEEKDAY(serial_number,return_type)
Serial_number is a sequential number that represents the date of the day you are trying to find. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Return_type is a number that determines the type of return value.
Return_type Number returned 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel. 2 Numbers 1 (Monday) through 7 (Sunday). 3 Numbers 0 (Monday) through 6 (Sunday).
Remark
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900. Microsoft Excel for the Macintosh uses a different date system as its default.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?

  1. Create a blank workbook or worksheet.
  2. Select the example in the Help topic. Do not select the row or column headers.
    selecthelp.gif

    Selecting an example from Help
  3. Press CTRL+C.
  4. In the worksheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.

1 2 A Data 2/14/2008 Formula Description (Result)
=WEEKDAY(A2) Day of the week, with numbers 1 (Sunday) through 7 (Saturday) (5)
=WEEKDAY(A2,2) Day of the week, with numbers 1 (Monday) through 7 (Sunday) (4)
=WEEKDAY(A2,3) Day of the week, with numbers 0 (Monday) through 6 (Sunday) (3)
Note 2/14/2008 is a Thursday.
Các bạn thấy trong Help của Excel đã hướng dẫn rõ ràng, nó để mở cho việc lựa chon tham số tuỳ theo các quốc gia hay tập quán địa phương đó thôi
 
Web KT
Back
Top Bottom