View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default How do I concantenate two columns for the length of a table?

Sub PutTogether()
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 to lastRow '<<assumes header row
Range("C" & i) = Cells(i, 1) & " " & Cells(i, 2)
Next
End Sub

"zach-18" wrote:

I have a daily report in which I need to combine the 1st and last name. I
would like to write a macro that would concatenate the report, regardless of
the number of rows. If the 1st name is in Col A, last name is in Col B, and
the combined would go in Col C, what would the VBA text look like?

Thanks and Kind Regards in advance for any help.