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
工作表公式不是写出宏而是写出来的方式吗? –