copy entire row from sheet1 into sheet2 matching ID and column header

dileepkmr3

New Member
Joined
May 2, 2017
Messages
3
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">Sheet1
ID First Last Street City State Zip
---------------------------------------------------
51 Alfred Obrien 636 Charla Lane Richardson TX 75081
52 Donald Lemmons 4956 Center Street Umatilla OR97882
53 Corrine McCann 3149 West Street Grand Rap MI 49546
54 Monique Gavin 4078 Maryland Largo FL 34640
55 Steven Murray 965 Tree Top Lane Lansdowne PA 19050
56 Kelley Robins 1191 Earnhardt Louisville KY 40223

Sheet2
ID Zip State Last City first Street Zip
-----------------------------------------
56
51
87
52
55
53
54


need to copy the data row wise depends on ID(unique) if ID matches copy and paste the row at the same time column header should match. if you observe column headers are same but position is different in sheet2.
i got vlookup formula but#N/A is getting whenever if ID doesn't match which is overwriting the data.. so i need VBA code


</code>
 
Last edited by a moderator:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Cross posted https://www.excelforum.com/excel-pr...nto-sheet2-matching-id-and-column-header.html

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top