View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Find last cell of data

Hi Striker,

Now that i have the last row number I need to loop thru that many rows and
combine cells A, C, and F into a cell G.


A C F G
1234 3032109987 UNK 12343032109987UNK


Try something like:

'=============
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim rCell As Range
Dim LastRow As Long

Set WB = Workbooks("YourBook.xls") '<<==== CHANGE
Set SH = WB.Sheets("Sheet2") '<<==== CHANGE

LastRow = Cells(Rows.Count, "A").End(xlUp).Row

Set rng = Range("A2:A" & LastRow)

For Each rCell In rng.Cells
With rCell
.Offset(0, 3).Value = .Value _
& .Offset(0, 1).Value & .Offset(0, 2).Value
End With
Next rCell
End Sub
'<<=============


---
Regards,
Norman