Copying data with same headers from sheet 2 to sheet 1. VBA???

jacobswayne

New Member
Joined
Jan 15, 2020
Messages
12
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello everyone. I have had this issue for about a week now and it has been killing me slowly. What I am trying to do is move data from “sheet 2” to “sheet 1”. I only need the values to move over from sheet2 to sheet1 (the headers are the same). For example, on both sheets lets say I have name,address, POC info. Sheet 1 has name and address info, sheet 2 has POC info. I need to move the POC info to sheet 1. When I say poc info its separated by different columns like name, email, phone number,etc. Can someone assist? Does this make sense?? Ive been copying and pasting and its taking me foreverrrrrrrr.

Ive tried vlookup and im not good with vba so neither worked for me. Safe to say im a noob :/


Thank you.
 
Ensure your columns are exactly as you stated on BOTH sheets and that they start in column A.

If so the enumeration would be correct:
VBA Code:
Public Enum ColumnHeaders
    ID = 1
    FullName
    StreetAddress
    City
    State
    ZipCode
    Country
    ITName
    ITTitle
    ITEmail
    ITPhone
    ITName1
    ITTitle1
    ITEmail1
    ITPhone1
    Website
End Enum
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Okay coming back around to this. So I input the script into my master document. A lot of the data was in wrong boxes but I went in and fixed. The issue I just noticed was none of the ITNAME carried over.
 
Upvote 0
In the code I've given It assumes ITNAME is column 8, (Column"H")

Check no columns are hidden and that ITNAME is in fact "H"
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,716
Members
452,995
Latest member
isldboy

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