Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

concatenating data

ResolvedVersion 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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Seeing named ranges as part of the zoom

If you have large areas of named ranges this works better.

If you zoom down to 39% you will see your named range.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.