M
Miree
I have some code which copies and pastes for a few differnet places how can i
paste from the next blank row
paste from the next blank row
Miree said:The first copy and paste is working ok, pasting below my headings, but when i
put a second set of code after it pastes over the exsiting pasted data. Still
neither will paste starting from column B.
Mike H said:Miree,
You are doing a lot of selecting that you don't need to do. Not tested but
try this
Workbooks.Open "G:\Drilling Fluids Technology\Fluids
Database\FluidDatabaseMM.xls"
Windows("FluidDatabaseMM.xls").Activate
Sheets("FormulationsDatabase").Range("A5Z5000").Copy
Windows("TheDatabase.xls").Activate
Sheets("Formulations").Select
lastrow = Sheets("Formulations").Cells(Cells.Rows.Count,
"B").End(xlUp).Row + 1
Range("B" & lastrow).PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Windows("FluidDatabaseMM.xls").Activate
Sheets("ResultsDatabase").Range("A5Z5000").Copy
Windows("TheDatabase.xls").Activate
lastrow = Sheets("Results").Cells(Cells.Rows.Count, "B").End(xlUp).Row + 1
Range("B" & lastrow).PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
'Close Workbook
Application.DisplayAlerts = False
Workbooks("FluidDatabaseMM.xls").Close
Application.DisplayAlerts = True
Mike
Range("B" & lastrow).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.