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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Simon4s

Board Regular
Joined
Sep 22, 2014
Messages
152
Office Version
  1. 2016
  2. 2013
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)
 

leeb91

New Member
Joined
May 22, 2015
Messages
20
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:
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,528
Messages
5,837,884
Members
430,520
Latest member
VenkateshRajaganesan

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
Top