View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Range and non contiguous cells

Untested but you can give this a try...

Windows("Loans Delinquency APRIL 2007.xls").Activate
Sheets("Bank 101 Ledger 19").Select
Union(Cells(i, 2), Cells(i, 4), Cells(i, 6), Cells(i, 8), Cells(i, 10),
Cells(i, 12), Cells(i, 14), Cells(i, 16), Cells(i, 18)).Select
Range(Cells(i, 18)).Activate
Selection.Copy
Windows("2007 LOANS DELICUENCY BANK 101.xls").Activate
Sheets("APRIL").Select
Cells(y, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True

--
HTH...

Jim Thomlinson


"fsmelgar" wrote:

Hi, I am trying to copy and paste some cells, Here is a piece of the macro.

Windows("Loans Delinquency APRIL 2007.xls").Activate
Sheets("Bank 101 Ledger 19").Select
Range("Cells(i, 2), Cells(i, 4), Cells(i, 6), Cells(i, 8), Cells(i, 10),
Cells(i, 12), Cells(i, 14), Cells(i, 16), Cells(i, 18)").Select
Range(Cells(i, 18)).Activate
Selection.Copy
Windows("2007 LOANS DELICUENCY BANK 101.xls").Activate
Sheets("APRIL").Select
Cells(y, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
But in the range where ther is the multiple cells in stops.

I have the same for 12 items and the macro stops in the first.

Can anyone help me.

Thanks

Fernando