﻿ 計算兩個日期之間的差距 - Excel

# 計算兩個日期之間的差距

## 計算兩個日期間的天數

### 範例

1. Press CTRL+C.

2. In Excel, create a blank workbook or worksheet.

3. In the worksheet, select cell A1, and press CTRL+V.

1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.

 -1 ^2 3 4 5 6
 文字字串 C 日期 6/8/2007 6/20/2007 描述 (結果) 描述 (結果) =A3-A2 兩個日期間的天數 (12) =NETWORKDAYS(A2,A3) 兩個日期間的工作天 (9)

Top of Page

## 計算兩個日期間的月數

### 範例

1. Press CTRL+C.

2. In Excel, create a blank workbook or worksheet.

3. In the worksheet, select cell A1, and press CTRL+V.

1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.

 -1 ^2 3 4 5 6 7
 文字字串 C 描述 (結果) =DATE(YEAR(A2)+3,MONTH(A2)+1,DAY(A2)+5) 9/2/2007 12/10/2008 描述 (結果) 描述 (結果) =MONTH(A3)-MONTH(A2) 同一年的兩個日期間出現的月數 (3) =(YEAR(A4)-YEAR(A3))*12+MONTH(A4)-MONTH(A3) 相隔一年以上的兩個日期間出現的月數 (15)

Top of Page

## 計算兩個日期間的年數

### 範例

1. Press CTRL+C.

2. In Excel, create a blank workbook or worksheet.

3. In the worksheet, select cell A1, and press CTRL+V.

1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.

 -1 ^2 3 4 5
 文字字串 C 描述 (結果) =DATE(YEAR(A2)+3,MONTH(A2)+1,DAY(A2)+5) 6/4/2010 描述 (結果) 描述 (結果) =YEAR(A3)-YEAR(A2) 兩個日期間相隔的年份 (3)

• 您可以將日期的格式改為數字的形式。選取該儲存格，然後在 [常用] 索引標籤上，按一下 [數字] 群組中的箭號，再按一下 [數字]

• 如果從較早日期減去較晚的日期，儲存格中會出現錯誤 ####

Top of Page

﻿

255 剩餘字元數