View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nik[_3_] Nik[_3_] is offline
external usenet poster
 
Posts: 12
Default Insert Data Last Row Loop through cells Excel 2000 & 2003

jfcby wrote:

'write the data to the new sheets
lastrow.Offset(1, 0) = WS.Range("D8:D15").Value
lastrow.Offset(1, 1) = WS.Range("B8:B15").Value
lastrow.Offset(1, 2) = WS.Range("E8:E15").Value


Replace this section with:

i = 1
For Each j In Array(3, 1, 4)
For k = 0 To 7
lastrow.Offset(k, i) = ws.Range("b8").Offset(k, j - 1)
Next
i = i + 1
Next


Nik