I have following scenario: I have one excel sheet with below data: Excel Sheet 1 contains below data:
COLUMN 1 COLUMN 2 COLUMN 3 COLUMN 4 COLUMN 5 COLUMN 6 COLUMN 7
First Name Last Name Email Phone City State Zip
--------------------------------------------------------------------------------
John Adams JA@gmail.com 1234567 Any Town VA 12345
John William JW@gmail.com 1234568 Any Town VA 12345
John Smith JW@gmail.com 1234569 Any Town VA 12345
John Edwards JE@gmail.com 1234560 Any Town VA 12345
================================
Excel Sheet 2
COLUMN 1 COLUMN 2 COLUMN 3 COLUMN 4
------------------- ------------- -------------
JADAMS JWILLIAM JSMITH JEDWARDS
{FIRST_NAME}{FIRST_NAME} {FIRST_NAME}{FIRST_NAME}
{LAST_NAME} {LAST_NAME} {LAST_NAME} {LAST_NAME}
{EMAIL} {EMAIL} {EMAIL} {EMAIL}
{PHONE} {PHONE} {PHONE} {PHONE}
{CITY} {CITY} {CITY} {CITY}
{STATE} {STATE} {STATE} {STATE}
{ZIP} {ZIP} {ZIP} {ZIP}
1/1/2000 1/1/2002 1/1/2005 1/1/2000
ADD UPDATE INSERT ADD
HOME BUSINESS HOME BUSINESS
Y N Y Y
Y Y N Y
N Y Y Y
M M M F
I want to copy First Name from Sheet 1 into Sheet 2 and replace {FIRST_NAME} and other data enclosed in {} and then loop through sheet 1 until all rows are scanned.
You don't need VBA here, just copy all of your data in Sheet1, and then go to Sheet2 and Paste Special
be sure to select the Transpose
option
Note, to bring up the paste special dialog box you can press Alt + E + S
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.