Formula to combine two worksheets

vray0512

New Member
Joined
Oct 17, 2017
Messages
1
I have 2 worksheets I need to combine - I need the data from the 2nd sheet that matches the first sheet to be put in the Post-test Q1, etc. So Sam from the second sheet would be ignored, Bob's data from 2nd sheet would be put into 1st sheet in appropriate place. Trying to match pre and post test data.
1st one has data like this

NamePretest Q1Pretest Q2Pretest Q3Post Test Q1Post Test Q2Posttest Q3
johnABC
BobBCD

<tbody>
</tbody>

My second spreadsheet
NameQuestionAnswer
BobQ1A
BobQ2B
BobQ3D
SamQ1A
SamQ2B
SamQ3C
JohnQ1D
JohnQ2C
JohnQ3D

<tbody>
</tbody>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
On the second sheet create a column where you do a concatenation of Name and Question.

For example, Assuming columns shown are A-C, in d2 type "=concatenate(a2,b2)"

Then fill down.

On the first Sheet, in E3, type "=index('Second Sheet'!$c:$c, match(concatenate($a3,e$2), 'Second Sheet'!$d:$d,0))

(Replacing "Second Sheet" with the name of the actual sheet)
 
Upvote 0

Forum statistics

Threads
1,215,606
Messages
6,125,805
Members
449,262
Latest member
hideto94

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