View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Concat a three column range into one cell Then Next...

Hi Howard,

Am Wed, 16 Oct 2013 03:22:29 -0700 (PDT) schrieb Howard:

I would like to be able to run this code down column AU, say 25 rows. (adjustable, might be 60 next column I use it in)

The three cells I want to concat code to join are AU.Offset(0, -6).Resize(1, 3).
And there are blank cells. Where blank means all three of the cells to be joined will be blank


try:
Sub Test()
Dim LRow As Long
Dim i As Long
Dim myStr As String

LRow = Cells(Rows.Count, "AO").End(xlUp).Row
For i = 2 To LRow
myStr = Replace(Cells(i, "AO") & Cells(i, "AP") & _
Cells(i, "AQ"), " ", "")
Cells(i, "AU") = myStr
Next
End Sub


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2