One more question) Extracting the matching columns to the other sheet

leeb91

New Member
Joined
May 22, 2015
Messages
20
I have two sheets. First one has 4 columns and more than 100 rows for each column

ColumnA......ColumnB......ColumnC......ColumnD

Claim_ID.........................................Claim_Status

...123............... A................B ............ Closed

The other sheet only has one row as below

ColumnA.......ColumnB.......ColumnC......ColumnD

Claim_ID.........State........Claim_Status....Date

I have to copy from the first sheet the data that's under the same column headings as sheet2
For example, the result should be

ColumnA.......ColumnB.......ColumnC.......ColumnD

Claim_ID.........State........Claim_Status.....Date

..123..................................Closed

Is this possible? In the first sheet, there are more than 100 rows that need to be copied.
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I have two sheets. First one has 4 columns and more than 100 rows for each column

ColumnA......ColumnB......ColumnC......ColumnD

Claim_ID.........................................Claim_Status

...123............... A................B ............ Closed

The other sheet only has one row as below

ColumnA.......ColumnB.......ColumnC......ColumnD

Claim_ID.........State........Claim_Status....Date

I have to copy from the first sheet the data that's under the same column headings as sheet2
For example, the result should be

ColumnA.......ColumnB.......ColumnC.......ColumnD

Claim_ID.........State........Claim_Status.....Date

..123..................................Closed

Is this possible? In the first sheet, there are more than 100 rows that need to be copied.

Are the column headings the same in both sheets?

Do a vlookup

In the sheet with one row:
IN a2: =vlookup(A$1,sheet2!$A$1:$D$100,1,false)
IN B2: =vlookup(B$1,sheet2!$A$1:$D$100,2,false)
IN C2: =vlookup(C$1,sheet2!$A$1:$D$100,3,false)
IN D2: =vlookup(D$1,sheet2!$A$1:$D$100,4,false)
 
Upvote 0
Hi, the first sheet had had unnecessary column headings in which I removed for convenience. I have thought about that approach but this is a recurring need with more than 30~50 columns and 70,000 lines so I thought I would have to find a way to automate it. The columns in sheet1 that have the same column headings as sheet2 have to be copied into sheet2 correspondingly. I shrunk the number greatly for clearer explanation.
Thanks for the input.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,628
Messages
6,120,618
Members
448,973
Latest member
ChristineC

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