|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
修改后_转换问题.rar
(16.95 KB, 下载次数: 1)
Sub test()
With Sheets(1)
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
flag = 0
For j = 2 To Cells(Rows.Count, 7).End(xlUp).Row
If Cells(j, 7).Value = Cells(i, 1).Value Then
'存在
flag = 1: Exit For
End If
'复制过来
Next
If flag = 0 Then
Range("A" & i & ":B" & i).Copy Destination:=Range("G" & j)
End If
Select Case Cells(i, 3).Value
Case "F"
c = 14
Case 110
c = 9
Case 120
c = 10
Case 130
c = 11
Case 140
c = 12
Case 150
c = 13
End Select
Cells(j, c).Value = Cells(j, c).Value + Cells(i, 4).Value
Next
End With
End Sub |
|