|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub 对应的底薪()
- Dim sht, sht1 As Worksheet, i, n, m, x As Integer
- Set sht = ThisWorkbook.Worksheets(1)
- Set sht1 = ThisWorkbook.Worksheets(2)
- i = 1
- Do While sht1.Cells(1, i).Value <> ""
- For n = 2 To sht.Cells(Rows.Count, 2).End(xlUp).Row
- If sht1.Cells(1, i).Value = sht.Cells(n, 2).Value Then
- For m = 2 To sht1.Cells(Rows.Count, 1).End(xlUp).Row
- If sht.Cells(n, 1).Value = sht1.Cells(m, 2).Value Then
- sht.Cells(n, 3).Value = sht1.Cells(m, i).Value
- End If
- Next
- End If
- Next
- i = i + 1
- Loop
- End Sub
复制代码 |
|