View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob[_52_] Bob[_52_] is offline
external usenet poster
 
Posts: 3
Default VBA help - worksheets and range questions

Tom,

I will give this a try when I get into work tomorow. Thanks for the
help. I see your name quite often on the newsgroup. Without people
like you - it wouldn't work for the rest of us. I hope I can give a
little back someday.

Bob.

Tom Ogilvy wrote:
Sub MoveData()

Dim r As Long
Dim wtf As Worksheet
set wtf = ActiveWorkbook.Sheets("wtf")

For r = 1 To Cells(rows.count,1).End(xlup).Row
If sh.Cells(r, 3) < "" Or Sheet2.Cells(r, 4) < "" Then
Sheet1.Rows(1).Insert
Sheet1.Cells(1, 1) = Sheet2.Cells(r, 3)
Sheet1.Cells(1, 2) = Sheet2.Cells(r, 4)
Sheet1.Cells(1, 3) = Sheet2.Cells(r, 3) + ", " + Sheet2.Cells(r,
4)
End If
Next