If [c4] <> "" And [a2] = "" Then [a2] = Date
If [c4] = "" Then [a2] = ""
If [c4] <> "" And [b4] = "" Then [b4] = Date
If [c4] = "" Then [b4] = ""
End Sub作者: bear0925900003 時間: 2013-7-26 18:46
更正 下面的IF公式是這部分要簡化,下面的公式要從C4一直重複很多,拜託幫幫忙,感恩
If [c4] <> "" And [b4] = "" Then [b4] = Date
If [c4] = "" Then [b4] = ""
If [c5] <> "" And [b5] = "" Then [b5] = Date
If [c5] = "" Then [b5] = ""作者: oobird 時間: 2013-7-26 21:58
學習vba最基本的要學習建立迴圈,如此例可以這樣:
For i = 4 To 100
If Range("c" & i) = "" Then
Range("b" & i) = ""
Else
If Range("b" & i) = "" Then Range("b" & i) = Date
End If
Next作者: GBKEE 時間: 2013-7-27 07:15