Excel if 問題 (高手)

2010-02-13 10:01 am
想知道如何運用excel公式 (一條算式) 來計算應得出5種差別的結果 ?
例如 :以今天(13/Feb/2010)來計算 :

1."On-time” =相同13/Feb/2010; 及不超過13/Feb/2010

2."On-time with advance 2 week” =相同13/Feb/2010; 及比13/Feb/2010早於14天

3."On-time with advance 6 week or above”=相同13/Feb/2010; 及比13/Feb/2010早於42天以上

4."Delay” =大過了13/Feb/2010

5."Delay with less than 2 week =大過了13/Feb/2010;並且少於14天
更新1:

1.On-time =相同13/Feb/2010; 及不超過13/Feb/2010 2.On-time with advance 2 week =相同13/Feb/2010; 及比13/Feb/2010早於14天 3.On-time with advance 6 week or above =相同13/Feb/2010; 及比13/Feb/2010早於42天以上 4.Delay =大過了13/Feb/2010 5.Delay with less than 2 week =大過了13/Feb/2010;並且少於14天

更新2:

您好andycmh2001, 感謝你的幫忙, 謹祝農曆新年 財源廣進、身體健康。 但再有一事要請求指引, 資料是日期與日期的互相作為比較:

更新3:

設資料在A欄是:截止期限 (日期) 設資料在B欄是:送貨日 (日期) 1. On-time=(送貨日)是(截止期限)當天或之前 2. On-time with advance 2 week=(送貨日)是(截止期限)之前14天 3. On-time with advance 6 week or above=(送貨日)是(截止期限)之前多於42天以上 4. Delay=(送貨日)是超越(截止期限)當天之後; 及(送貨日)是B欄填上AAA 5. Delay with less than 2 week=(送貨日)是超越(截止期限)當天之後14天內 6. Pending=(送貨日)是B欄空白沒資料

回答 (1)

2010-02-13 6:27 pm
✔ 最佳答案
設資料在A欄

B1=IF(TODAY()-A1>=42,"On-time with advance 6 week or above",IF(TODAY()-A1>=14,"On-time with advance 2 week",IF(TODAY()>=A1,"On-time",IF(A1-TODAY()<14,"Delay with less than 2 week","Delay"))))

公式下拉便成

2010-02-13 12:51:03 補充:
C1=IF(B1="","Pending",IF(B1="AAA","Delay",IF(A1-B1>=42,"On-time with advance 6 week or above",IF(A1-B1>=14,"On-time with advance 2 week",IF(A1>=B1,"On-time",IF(B1-A1<=14,"Delay with less than 2 week","Delay"))))))

Please try


收錄日期: 2021-04-27 13:11:58
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20100213000051KK00167

檢視 Wayback Machine 備份