View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Howard Howard is offline
external usenet poster
 
Posts: 536
Default Resize a row but copy but skip columns I don't want to copy

Set bRng = Range("B14:B" & lRow)

myArr = Array(1, 2, 4, 6)



For Each c In bRng

If c.Value < "" Then

lRow = Worksheets("Invoice Data"). _

Cells(Rows.Count, 3).End(xlUp).Row + 1

For i = LBound(myArr) To UBound(myArr)

Worksheets("Invoice Data").Cells(lRow, i + 3) _

= Cells(c.Row, myArr(i))

Next

End If

Next


Hi Claus.

Using the above.

I get an error "expected an array" with the LBound blue highlighted.
For i = LBound(myArr)

Have I dimmed these correctly?

Dim myArr As Range
Dim j As Range
Dim i As Long

Howard