View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
owl527[_6_] owl527[_6_] is offline
external usenet poster
 
Posts: 1
Default .offset() function


Hi,

can someone please let me know what the Dowhile loop is doing please?

Set ws = ThisWorkbook.Sheets("WarrantDetails")
Set rgSource
ThisWorkbook.Sheets("SG_WarrantRic").Range("ric_ta ble")
Set rgTarget
ThisWorkbook.Sheets("WarrantDetails").Range("ric_l ist")
Set rgUnder
ThisWorkbook.Sheets("WarrantDetails").Range("under _list")

nRow = 0
ntRow = 0


ws.Cells.ClearContents

Do While Not Left(rgSource.Offset(nRow, 0).Value, 4) = "#N/A"
For nCol = 1 To 14
If Trim(rgSource.Offset(nRow, nCol - 1).Value) < "" Then
rgTarget.Offset(ntRow, 0).Value = rgSource.Offset(nRow
nCol - 1).Value
ntRow = ntRow + 1
End If
Next nCol
nRow = nRow + 1
Loop


Thanks

--
owl52
-----------------------------------------------------------------------
owl527's Profile: http://www.excelforum.com/member.php...fo&userid=2091
View this thread: http://www.excelforum.com/showthread.php?threadid=47619