sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
Guys - I'm using this to copy values to another workbook only if the cell in column A and D are not blank;
Once that data has been copied, I would like the row containing that data to be deleted, (shift up). Can someone show me how please?
Code:
For Each Cell In Sheet1.Range("A2:A95")If Cell.Value <> "" Then
If Cell.Offset(0, 3).Value <> "" Then[INDENT]Set ws = DestFile.Sheets("Data")[/INDENT]
[INDENT]iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row[/INDENT]
[INDENT=2]ws.Cells(iRow, 3).Value = Cell.Value
ws.Cells(iRow, 1).Value = Cell.Offset(0, 2).Value
ws.Cells(iRow, 2).Value = Cell.Offset(0, 3).Value[/INDENT]
[INDENT]End If[/INDENT]
End If
Next
Once that data has been copied, I would like the row containing that data to be deleted, (shift up). Can someone show me how please?