請問以下函數 =TRIM(RIGHT(SUBSTITUTE(F6,"/",REPT(" ",LEN(F6))),LEN(F6))),如何轉換成VBA, 這是為了要取儲存格F6內"/"右邊的全部字元,但VBA內的儲存格需換成變數,例如Cells(x, 2),請高手幫幫忙!?

2017-09-10 4:22 pm

回答 (1)

2017-09-11 8:51 pm
✔ 最佳答案
x 想要做什麼

Sub 巨集1()
For i = 2 To [F65536].End(3).Row
Rng = Cells(i, 6)
Rnga = Len(Rng)
Rngb = InStr(1, Rng, "/")
Cells(i, 1) = Mid(Rng, Rngb + 1, Rnga - Rngb)
Next
End Sub


收錄日期: 2021-05-03 06:50:22
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20170910082200AAC8XEm

檢視 Wayback Machine 備份