title: Concatenate two columns and skip blank cells
body: <p>My current spreadsheet has two columns of data I would like to concatenate. In my provided code, I create a column to the right of the columns I would like to combine and then use a FOR loop to combine each value with a ", " between the values. I would like to adjust the code to skip cells/rows without values because now I end up with a ", " in my combined column if the two initial columns had no values.</p>
  
  <pre><code>Public Sub MergeLatLong()
  
  Dim LastRow As Long
  
  Worksheets("Raw_Data").Activate
  Columns("AT:AT").Select
  
  Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
  
  LastRow = Range("AR" &amp; Rows.Count).End(xlUp).Row
  
      For i = 2 To LastRow
      Cells(i, 46) = Cells(i, 44) &amp; ", " &amp; Cells(i, 45)
      Next i
  
  End Sub 
  </code></pre>