View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Using a macro to paste cells one cell below the last cell.

Not sure if I got the source and destination locations correct. This code
should be easy to fix

with workbooks("D090130-FX.xls").Sheets("terminer")
set StartLocation = .Range("F2:G2")
.Range(StartLocation, StartLocation.End(xlDown)).Copy
end with

with workbooks("Mark to Market.xls").Sheets("ProFX")
set LastCell = .Range("A" & Rows.count).End(xlup)
set NewCell = LastCell.offset(rowoffset:=1,columnoffset:=0)
NewCell.Paste
end with



"Magnus HB" wrote:

Range("F2:G2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("Mark to Market.xls").Activate
Sheets("ProFX").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Selection.End(xlDown).Select
Range("A165").Select I THINK IT IS HERE THE
PROBLEM IS
Windows("D090130-FX.xls").Activate
Sheets("terminer").Select
Range("D2:E2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("Mark to Market.xls").Activate
Range("A165").Select OR MAYBE HERE

"joel" wrote:

Post your code.

"Magnus HB" wrote:

I have some information in one sheet that I want to copy and paste to another
sheet at the bottom of it (END + one sell), but now it looks like it will be
pasted in the same cell, regardless how many rows i have in the source sheet
and in the sheet that I paste the information in.