close
把 "B5" 欄位的字元數算出來 , 用8去減掉 , 補上字元 "0".
欠好意思我沒說清晰,應當是B5貯存格為8位,任何數字文字不足8位的前面自動補零.
https://www.mobile01.com/topicdetail.php?f=511&t=5353745&p=1#66947095
Sub test()
--------------------------------------------------------------------------------------
補零專用 ...![](https://imageproxy.pixnet.cc/imgproxy?url=https://attach2.mobile01.com/images/smile/3.png)
![](https://imageproxy.pixnet.cc/imgproxy?url=https://attach2.mobile01.com/images/smile/3.png)
![](https://imageproxy.pixnet.cc/imgproxy?url=https://attach2.mobile01.com/images/smile/3.png)
--------------------------------------------------------------------------------------
補零專用 ...
![](https://imageproxy.pixnet.cc/imgproxy?url=https://attach2.mobile01.com/images/smile/3.png)
![](https://imageproxy.pixnet.cc/imgproxy?url=https://attach2.mobile01.com/images/smile/3.png)
![](https://imageproxy.pixnet.cc/imgproxy?url=https://attach2.mobile01.com/images/smile/3.png)
Range("B5") = String(8 - Len(Range("B5")), "0") & Range("B5")
End Sub
yuliwei0001 wrote:
在該格上 右鍵->貯存格花式->數值->自訂
若是要改要用公式的話,可參考這一篇
yuliwei0001 wrote:
文章標籤
全站熱搜