98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Concatenating Data
Concatenating Data
Resolved · High Priority · Version 2010
Freddie has attended:
Excel VBA Introduction course
Concatenating Data
Hi Team,
Firstly, many thanks for your previous responses - they have been HUGELY helpful.
I'm struggling to come up with a formula to concatenate data.
All I want to do is concatenate data in columns A and B starting from A2 and B2.
I also want to use the function Do Until Activecell.offset = ""
I've tried searching the web, but all I seem to find is really long winded VBA code - surely there is something more easier to use??
Thanks!
Freddie
RE: Concatenating Data
Hi Freddie
Here's one way of concatinating using vba.
It includes Activecell.Offset(r,c)
where r is the row and c the column position relative to the activecell.
Sub Join()
Range("A2").Select
Do Until ActiveCell = ""
ActiveCell.Offset(0, 2)=ActiveCell & " " & ActiveCell.Offset(0, 1)
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Note
If you want to do the same thing without a macro type
=A2 & " " & B2
into cell C2 and double click the autofill handle.
Hope that works for your data.
Regards
Doug
Best STL
Wed 25 Feb 2015: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Using Alt in Save Dialog BoxWhen you are saving (or opening) a file, try these; |