- Sub Macro1()
- Set sht1 = Sheets("Sheet1")
- Set sht2 = Sheets("Sheet2")
- Set sht3 = Sheets("Sheet3")
- LastRow = sht1.Cells(sht1.Rows.Count, 1).End(xlUp).Row
- For rw = 2 To LastRow
- With Sheets("Sheet2")
- Range("A1").Copy
- End With
- sht1.Cells(rw, 1).Copy
- Sheets("Sheet2").Select
- Range("A1").Select
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
- :=False, Transpose:=False
- With Sheets("Sheet3")
- Sheets("Sheet3").Select
- selectend = Cells(1, Columns.Count).End(xlToLeft).Column
- Range("A1", Cells(1, selectend)).Copy
- LR = .Cells(.Rows.Count, 1).End(xlUp).Row
- Cells(LR, 1).Offset(1, 0).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
- :=False, Transpose:=False
- If Cells(LR, 1).Offset(0, 0).Value = 0 Then ''''''''''''' ( value = 0 ) ´N delete
- Cells(LR, 1).EntireRow.Delete ''''''''''''' ( value = 0 ) ´N delete
- End If
- End With
- Next
- End Sub
½Æ»s¥N½X
test123.rar (10.06 KB)
§Ú³]¤F¤@Ó¤èªk ¦pªG ( value = 0 ) ´N delete, ¦ý¬°¤°»ò³Ì«áªº¤@Ó 0 delete ¤£¨ì ???? |