Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simple Merge Macro

Posted on 2014-01-11
2
Medium Priority
?
266 Views
Last Modified: 2014-01-11
EE Pros,

I'm trying to simply merge a First Name Column of data with a Last Name Column to give me a resulting FULL NAME Column.  In other words, I have John in Column B and Smith in Column C, same row.  I need a result in Column D of John Smith.  I tried recording a macro (with and without relative on) and to no avail.

Sample attached.

Thank you in advance,

B.
Simple-Merge.xlsm
0
Comment
Question by:Bright01
2 Comments
 
LVL 1

Accepted Solution

by:
hcoragem earned 2000 total points
ID: 39773363
Here is a simple macro

When building this macro you should select "Use Relative References".

Sub Macro1()
'
' Keyboard shurtcut: Ctrl+q
'
' B = First Name Column
' C = Last Name Column
' D = Full Name Column
'
' Put the cursor on column C and press Ctrl+q

    ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-2],"" "",RC[-1])"
    ActiveCell.Offset(1, 0).Range("A1").Select
End Sub
0
 

Author Closing Comment

by:Bright01
ID: 39773389
Perfect!  Thank you!

b.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question