0
此代碼是複製單詞'小''中''大'它是靜態的,但我有名單 列(B)中用於搜索在(d)列,如果找到的話抄在 「E」列我如何搜索和複製只搜索到下一列
Option Explicit
Sub FindSize()
Dim c As Range, s, i As Long
s = Array("small", "medium", "large")
For Each c In Range("B2", Range("B" & Rows.Count).End(xlUp))
For i = LBound(s) To UBound(s)
If InStr(UCase(c), UCase(s(i))) > 0 Then
c.Offset(, 1) = UCase(s(i))
Exit For
End If
Next i
Next c
End Sub
工作表公式不是寫出宏而是寫出來的方式嗎? –