Copy from sheet and paste to last row used

J

JUAN

Hello,
this is what I'm trying to accomplish:
I want to copy the Total from two sheets and paste into
another sheet below its Total. Example,
Col A B C D
Tot OEM 5642 14587 5874 Etc (Destination sheet)
BLANK ROW
Tot DIST 4254 2541 1247 (copy from sheet2 pastehere)
BLANK ROW
Grand total 9898 17128 7121 (Copy from sheet3 paste here
I been trying to modify codes from post but cant' seem to
get it to work fine. I'm able to copy and paste but it
paste in wrong place and not at end of the sheet total.
I would do a simple copy and paste but since my
destination total's row might change depending on the data
so need to be able to paste to any row.
Hope I'm clear.
any info please advise would appreciate.
thanks,
Juan
 
D

Dave Peterson

I'm not sure what goes where, but this might give you an idea:

dim FromWks as worksheet
dim ToWks as worksheet
dim destCell as range

set fromwks = worksheets("sheet3")
set towks = worksheets("grandtotal")

with towks
set destcell = .cells(.rows.count,"A").end(xlup).offset(2,0)
end with

fromwks.range("a77").entirerow.copy _
destination:=destcell

===
Not quite sure how you get the row to copy, though.
 

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

Top