View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default copying an entire column

would something like this help? this may be one way. i assumed both sheets were
in the same workbook and the source sheet was called sheet1.

Option Explicit
Sub test()
Dim lastRow As Long
Dim i As Long, z As Long
Dim rng As Range, rng2 As Range

i = 19
z = 4
lastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
With Worksheets("BOM")
For i = 19 To lastRow
Set rng = .Cells(i, 1)
Set rng2 = Sheets("Sheet1").Cells(z, 1)
rng.Value = rng2
z = z + 1
Next
End With

End Sub


--


Gary


"dlb" wrote in message
...

I am copying info from a group of cells from one workbook to another
workbook as shown below, but I have a lot of cells to copy. Is it
possible to shorten this up by copying entire columns rather than one
cell at a time or possibly even an entire group of columns and rows?

Dim BNDL1 As String
Dim BNDL2 As String
Dim BNDL3 As String

BNDL1 = Range("A4").Value
BNDL2 = Range("A5").Value
BNDL3 = Range("A6").Value

Windows("VERCO.xls").Activate
With Worksheets("BOM")
Cells(19, 1).Value = BNDL1
Cells(20, 1).Value = BNDL2
Cells(21, 1).Value = BNDL3
End With


--
dlb
------------------------------------------------------------------------
dlb's Profile:
http://www.excelforum.com/member.php...o&userid=16483
View this thread: http://www.excelforum.com/showthread...hreadid=522860