-
1 # 使用者6149685759706
-
2 # 使用者6329925056418
按alt+F11鍵,開啟VBA視窗,雙擊sheet1,將下方的程式碼複製到開啟的視窗中;Sub 倒計時() [a1].NumberFormatLocal = "h:mm:ss;@" [a1] = [a1] - 1 / 3600 / 24 If [a1] < 1 / 60 / 24 Then [a1].Font.ColorIndex = 3 Else [a1].Font.ColorIndex = 5 End If If [a1] > 0 Then Application.OnTime Time + TimeSerial(0, 0, 1), "sheet1.倒計時", , True Else [a1] = "00:00:00" End IfEnd Sub;在A1單元格輸入倒計時開始的小時數,如3個小時“3:00”格式自定;點選“開發工具”-“插入”-“表單控價”,插入一個按鈕,打上想要的文字;在按鈕上右鍵,指定宏,選擇剛才編輯的宏,確定,;點選按鈕,就開始計時了,低於1分鐘後,字型會變成紅色。
-
3 # 使用者5916393697425
假設表格在A列到M列。
(不知道你資料從哪行開始的)
選擇D6,格式,條件格式,條件格式一,值,等於,"是" (注意是英文的引號),格式設為綠色字型;條件格式二,值,等於,"否",格式設為紅色字型,確定。
再選擇D6,雙擊選單的格式刷,點D6到F50,再點H6到H50。
選擇G6,格式,條件格式,條件格式一,值,等於,"竣工",格式設為綠色字型,確定。
再選擇G6,點選單的格式刷,刷到G7到G50。
“決算金額”是指“合同價款”嗎?
在M6輸入 =if(and(L6+365
將公式向下複製。
回覆列表
按alt+F11鍵,開啟VBA視窗,雙擊sheet1,將下方的程式碼複製到開啟的視窗中;
Sub 倒計時()
[a1]
.NumberFormatLocal
= "h:mm:ss;@"[a1] = [a1] - 1 / 3600 / 24
If [a1] < 1 / 60 / 24 Then
[a1]
.Font.ColorIndex
= 3Else
[a1]
.Font.ColorIndex
= 5End If
If [a1] > 0 Then
Application.OnTime
Time + TimeSerial(0, 0, 1), "sheet1.倒計時", , TrueElse
[a1] = "00:00:00"
End If
End Sub
在A1單元格輸入倒計時開始的小時數,如3個小時“3:00”格式自定;