Changing column names and automating data merge

R

rjr

Hello, Excel 2003.
My problem is I have data in Oracle on our mainframe and routinely download
this data into excel format.
I then copy and paste this data into the worksheet that I use.
The headers of each one are completely different and I'm looking to automate
the process and import all the data from one to the one I use.
I am also using JWalk data form and there is some calculated data in some of
the fields in the worksheet I'm importing into. I usually use JWalk and use
the "New" feature to generate blank records for as many rows as I'm going to
import.

I could use help with a formula that would allow me to take each column from
the worksheet I'm going to import from (always the same header) and import
that new data into the existing data (always to the same header) and place
it at the bottome of the worksheet's existing data. In the example Col 2 for
SSN would not be exported as it's not used anymore. So it would have to go
to Col 1 "Fname" and select all entries in that column and then move it to
"ERFname" and paste it after the existing data. THen I would like it to do a
sort by ID number so I could compare duplicates and remove the newer ones.

Col 1 Col 2 Col 3 Col 4 export to
Col1 Col2 Col3 Col 4
Fname SSN Telephone Lname
ERFname Telephone ERLname ETC.......

Any ideas or help would be greatly appreciated.
Bob Reynolds
 
T

Tom Ogilvy

Col A Col B Col C Col D
Fname SSN Telephone Lname
Data . . .
Data . . .
Data . . .


Col M Col N Col O
Fname Telephone Lname
Blank . . .

Use the Data=>Advanced Filter
With columns A:D as the source

M1:O1 as the destination

No criteria, Select copy to

Turn on the macro recorder to get the code while you do it manually.

then

set rng = Range("M1").CurrentRegion
set rng = rng.offset(1,0).Resize(rng.rows.count-1)
rng.copy Worksheets("Data").Cells(rows.count,1).End(xlup)(2)

and So forth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top