Concatenate A1, B1, and C1 into D1

T

TGalin

I have data in Column A1, B1, and C1. I’d like to concatenate all three
cells into one sentence in cell D1. Does anyone have code that can do that?
 
M

Mike H

Hi,

I'm guessing here that it's not just A1, b1 & C1 you want but if you do why
not this in d1

=a1&b1&c1

If it's a column of data then try this

Sub marine()
Dim lastrow As Long
Dim C As Range
Set sht = Sheets("Sheet1") 'Change to suit
lastrow = sht.Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set MyRange = sht.Range("A1:A" & lastrow)
For Each C In MyRange
C.Offset(, 3) = C & C.Offset(, 1) & C.Offset(, 2)
Next
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top