作者:狂风 | 来源:互联网 | 2023-05-18 15:27
Imtryingtorunthiscodehere:我试着运行这个代码:PrivateSubCommandButton1_Click()DimRow_AAsIn
I'm trying to run this code here:
我试着运行这个代码:
Private Sub CommandButton1_Click()
Dim Row_A As Integer, Row_B As Integer, Is_Copy As Boolean
Is_Copy = False
For Row_A = 1 To 850
For Row_B = 1 To 10840
Is_Copy = IsNumber(Search(Cells(Row_A, 1), Cells(Row_B, 2), 1))
If Is_Copy Then Cells(Row_B, 2).Interior.Color = RGB(255, 0, 0)
If Is_Copy Then Cells(Row_B, 3).Value = Is_Copy
If Is_Copy Then Cells(Row_B, 4).Value = Row_A
If Is_Copy Then Cells(Row_B, 5).Value = Row_B
Is_Copy = False
Next Row_B
Next Row_A
End Sub
But i get a popup saying:
但是我得到一个弹出窗口说:
"Compile error: Sub or Function not defined"
“编译错误:未定义的子或函数”
It then highlights Line 1 and the Search in Line 7.
然后突出显示第1行和第7行中的搜索。
What do I need to do to fix this?
我需要做什么来解决这个问题?
The issue I am trying to fix: I have two UID lists normally I would just compare the two of them, but Column b has 3 extra chars on the end so im using search to check to see if Column b Contains Column A.
我要解决的问题是:我有两个UID列表,通常我只是比较它们两个,但是b列有3个额外的字符,所以我用搜索来检查b列是否包含A列。
4 个解决方案