copying data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'd like to copy the range in 'calc worksheet' into 'DailyTeleStat'
worksheet following the last entry. I have seen vba coding where data can
be copied into the first empty row, however, the row being copied into is not
complete empty .. contains date/week number/period etc in the first few
columns (b-e); therefore, I'd been looking to have the data copied starting
at column f. How can I update the coding below to accomplish my means?


Sheets("calc worksheet").Select
Range("C95:J95").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("dailyTeleStat").Select
Range("F461").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Thanks,
Gail
 
try this

with Sheets("dailyTeleStat")
lastrow=.cells(.rows.count,"a").end(xlup).row
Sheets("calc worksheet").Range("C95:J95").Copy
..cells(l4,"f").PasteSpecial Paste:=xlValues
end with
 
Thanks for such a quick response.... When putting in your coding it does copy
the data into column F however into F2 when the last line is F462. Please
note it copies over a formula in F2 (so it's not as though this was a blank
cell). Any suggestions?

regards,
Gail
 
First, make sure you use a column that always has data in it to determine the
last row.

lastrow=.cells(.rows.count,"a").end(xlup).row
Change "a" to the column that you know is filled if the row is filled.

And then dropdown one row from that last used row:
.cells(lastrow+1,"f").PasteSpecial Paste:=xlValues
 
I understood your need to copy to col F based on row info in col A. Modify
to suit.
 

Ask a Question

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.

Ask a Question

Back
Top