|
楼主 |
发表于 2017-4-8 10:58
|
显示全部楼层
Dim LXYS, SYCH, NBJG
Set A = Sheets("属性").Range("A1:FF1").Find("流行元素", , , xlWhole)
If Not A Is Nothing Then
LXYS = A.Column '返回列
End If
Set b = Sheets("属性").Range("A1:FF1").Find("适用场合", , , xlWhole)
If Not A Is Nothing Then
SYCH = b.Column '返回列
End If
Set c = Sheets("属性").Range("A1:FF1").Find("内部结构", , , xlWhole)
If Not A Is Nothing Then
NBJG = c.Column '返回列
End If
If Target.Column <> LXYS And Target.Column <> SYCH And Target.Column <> NBJG Then Exit Sub
这段完整的代码是这样的 |
|