Hi again,
I need help here too, I have this table: examp.xlsx and I'm using a macro that copy and paste data to another spreadsheet with this code:
However I want to limit the functionality of this macro because I dont want this macro copy rows that have no data in columns C6, D6, E6, F6, G6, H6, J6, K6, M6, O6, in between rows 7 to 20. But can copy if there is no data in B6, I6, L6, N6, P6, Q6 in between rows 7 to 20.Sub Save()
Dim i&
With Sheets("Plan1").Range("B6").CurrentRegion
i = .Rows.Count - 1
With .Offset(1).Resize(i)
Union(.Columns(1).Resize(, 10), .Columns(12), .Columns(14).Resize(, 3)).Copy
Sheets("Plan2").Cells(Rows.Count, 3).End(xlUp)(2).PasteSpecial xlPasteAllExceptBorders
End With
End With
With Sheets("Plan2").Cells(Rows.Count, 2).End(xlUp)(2).Resize(i)
.FormulaR1C1 = "=ROW(RC[-2])-6"
.Value = .Value
End With
Application.CutCopyMode = False
End Sub
So if there is no data in these columns, a warning appears saying "Unable to copy. Complete the columns". Does anyone know how to do this?
Are trying to help me on this forum as well: http://www.vbaexpress.com/forum/show...ng-of-the-data
Cheers!
Bookmarks