|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub 圆角矩形6_Click()
- Application.ScreenUpdating = False
- For j = 2 To 6 Step 2
- If Len(Cells(j, 2)) > 0 Then
- Set Rng = Sheets("档案").Rows(j / 2).Find(Cells(1, j).Value, lookat:=xlWhole)
- If Not Rng Is Nothing Then
- r = Rng.Column
- With Sheets("档案")
- Cells(7, 1) = .Cells(1, r)
- Cells(7, 2) = .Cells(2, r)
- Cells(7, 3) = .Cells(3, r)
- Cells(7, 4) = .Cells(5, r)
- End With
- Else
- MsgBox "输入的" & Cells(1, j - 1) & "不存在"
- End If
- Exit For
- End If
- Next j
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|