Hi
I am new to VBA. Got a quick question for transfer data from several sheets to a master data sheet. The problem I am having now is there are couple blank cells. My code just ignore the blank cells on the master data sheet and paste next to the last cell with content. For example I attached a test excel. with my code. I want to leave the blank cell as it is to keep the same product in one row. below is my code. Thanks ahead! Waiting online!!!!!
Code
Sub Copypaste()
'
' Macro8 Macro
For Each ws In Worksheets
If ws.Name <> "Master" Then
ws.Range("B1").Copy
Worksheets("master").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
ws.Range("F1").Copy
Worksheets("master").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
End If
Next ws
End Sub
Display More