如何用VBA 解决一个难题,高手请进!

2025-01-05 10:55:56
推荐回答(3个)
回答1:

多少小钞来搞定你这些个问题...?

回答2:

Private Sub CommandButton1_Click()
Dim x%, y%, st$, tr$
x = ActiveSheet.[B1].End(xlToRight).Column
y = ActiveSheet.[A2].End(xlDown).Row
Range(Cells(2, 2), Cells(y, x)) = ""
For i = 2 To y
st = Left(Cells(i, 1).Text, 1)
For j = 2 To x
tr = Cells(1, j).Text
For k = 1 To 4
If IsError(Application.Find(Mid(tr, k, 1), st)) = False Then
Cells(i, j) = "有"
Exit For
End If
Next
If Cells(i, j) = "" Then
Cells(i, j) = "无"
End If
Next
Next
End Sub

回答3:

标题说的是VBA解决,后面又说用公式,我糊涂了