3 days and still no luck. Need Excel Formula or VBA help please!!! Matching Data

manvel001

New Member
Joined
Oct 27, 2015
Messages
12
I've been playing around with this for 3 days now and still no luck:confused:. Everyone I talk to has a different method (VLOOKUP, HLOOKUP, INDEX & MATCH) but none to seem to work just right. Any help would be greatly appreciated before I pull my hair out. Here is what I am trying to accomplish.

I would like to display the Form Entry ID..IF the Test ID from Sheet 1 matches the Test ID from Sheet 2. The Test ID field from sheet 2 is a user entry form so there is no consistent way the data is entered and there may be duplicates which is fine.



Sheet 1

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Form Entry ID[/TD]
[TD]Name[/TD]
[TD]Test ID[/TD]
[TD]Date[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 1[/TD]
[TD]12345[/TD]
[TD]11/5/2015[/TD]
[TD]California[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 2[/TD]
[TD]12346[/TD]
[TD]11/5/2015[/TD]
[TD]Texas[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 3[/TD]
[TD]98765[/TD]
[TD]11/5/2015[/TD]
[TD]Illinois[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 4[/TD]
[TD]98764[/TD]
[TD]11/5/2015[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 5[/TD]
[TD]56789[/TD]
[TD]11/5/2015[/TD]
[TD]Nevada[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 6[/TD]
[TD]54321[/TD]
[TD]11/5/2015[/TD]
[TD]Georgia[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Student 7[/TD]
[TD]54322[/TD]
[TD]11/5/2015[/TD]
[TD]Florida[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Form Entry ID[/TD]
[TD]Name[/TD]
[TD]Test ID[/TD]
[TD]Date[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]Student 1 [/TD]
[TD]#12345, Student 1 took test 12347 as well[/TD]
[TD]11/5/2015[/TD]
[TD]California[/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]Student 2[/TD]
[TD]12346, 12348, 12349[/TD]
[TD]11/5/2015[/TD]
[TD]Texas[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Student 3[/TD]
[TD]98765 98764 (Student 3 & Student 4 worked together)[/TD]
[TD]11/5/2015[/TD]
[TD]Illinois[/TD]
[/TR]
[TR]
[TD]104[/TD]
[TD]Student 4[/TD]
[TD]98764 and 98766[/TD]
[TD]11/5/2015[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD]105[/TD]
[TD]Student 5[/TD]
[TD]56789and56790[/TD]
[TD]11/5/2015[/TD]
[TD]Nevada[/TD]
[/TR]
[TR]
[TD]106[/TD]
[TD]Student 6[/TD]
[TD]54321passed[/TD]
[TD]11/5/2015[/TD]
[TD]Georgia[/TD]
[/TR]
[TR]
[TD]107[/TD]
[TD]Student 7[/TD]
[TD]54322 passed[/TD]
[TD]11/5/2015[/TD]
[TD]Florida[/TD]
[/TR]
[TR]
[TD]108[/TD]
[TD]Student 7[/TD]
[TD]54322 retake[/TD]
[TD]11/5/2015[/TD]
[TD]Florida[/TD]
[/TR]
</tbody>[/TABLE]

Desired Output Example


[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Form Entry ID[/TD]
[TD]Name[/TD]
[TD]Test ID[/TD]
[TD]Date[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]Student 1[/TD]
[TD]12345[/TD]
[TD]11/5/2015[/TD]
[TD]California[/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]Student 2[/TD]
[TD]12346[/TD]
[TD]11/5/2015[/TD]
[TD]Texas[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Student 3[/TD]
[TD]98765[/TD]
[TD]11/5/2015[/TD]
[TD]Illinois[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Student 3[/TD]
[TD]98764[/TD]
[TD]11/5/2015[/TD]
[TD]Illinois[/TD]
[/TR]
[TR]
[TD]104[/TD]
[TD]Student 4[/TD]
[TD]98764[/TD]
[TD]11/5/2015[/TD]
[TD]New York[/TD]
[/TR]
[TR]
[TD]105[/TD]
[TD]Student 5[/TD]
[TD]56789[/TD]
[TD]11/5/2015[/TD]
[TD]Nevada[/TD]
[/TR]
[TR]
[TD]106[/TD]
[TD]Student 6[/TD]
[TD]54321[/TD]
[TD]11/5/2015[/TD]
[TD]Georgia[/TD]
[/TR]
[TR]
[TD]107[/TD]
[TD]Student 7[/TD]
[TD]54322[/TD]
[TD]11/5/2015[/TD]
[TD]Florida[/TD]
[/TR]
[TR]
[TD]108[/TD]
[TD]Student 7[/TD]
[TD]54322[/TD]
[TD]11/5/2015[/TD]
[TD]Florida[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
As your data is inconsistent, can you upload your excel file anywhere on web and share link to download with us. That would be really Useful. However, as per sample shared by you, a helper column is needed in Sheet 2 with formula =left(c2,5) assuming test id starts from C2 in sheet2. Then you can use index match to perform right to left lookup. This will find maximum of your form entry ID. Hope this helps !
 
Upvote 0
This seems to partially work =IF(ISERROR(FIND(C2,Sheet2!C:C,1)),"Item Not Found",Sheet2!A2) but not consistently. I'm not sure if duplicates are handled well or not. If i enter a Test ID manually into C2, it does not seem to display the Form Entry ID. I'll post the excel data later this afternoon.
 
Upvote 0
One of the cells in sheet 2 contains the data '#12345, Student 1 took test 12347 as well'. I assume you want your app to pull the 'Form Entry ID' from sheet 2 if either '12345' is entered in sheet 1, or '12347' is entered. Is that correct?

Also - Will the 'Test ID' ALWAYS be 5 characters?
 
Upvote 0
Hi ramulose, I would like the app to pull the 'Form Entry ID' from sheet 2 only if the the 'Test ID' exists on Sheet 1. In this case it would only pull the 'Form Entry ID' for '12345'. The 'Test ID' will always be 5 characters on sheet 1. Users enter the 'Test ID' on sheet 2 which is the problem because the enter in other information as well which is not always consistent. Hope that helps.
 
Upvote 0
As your data is inconsistent, can you upload your excel file anywhere on web and share link to download with us. That would be really Useful. However, as per sample shared by you, a helper column is needed in Sheet 2 with formula =left(c2,5) assuming test id starts from C2 in sheet2. Then you can use index match to perform right to left lookup. This will find maximum of your form entry ID. Hope this helps !


Hello, here is the attached file. Thanks again <a href=http://www.filedropper.com/testdata><img src=http://www.filedropper.com/download_button.png width=127 height=145 border=0/></a><br /><div style=font-size:9px;font-family:Arial, Helvetica, sans-serif;width:127px;font-color:#44a854;> <a href=http://www.filedropper.com >share files free</a></div>
 
Upvote 0
Ok - I think we're getting there :-). A few more questions.

1. The 'Desired Output Example' table that you show, is that a different sheet, or are you updating sheet 1 with the data to make it look like that?
2. What does sheet 1 actually contain? Is it pre-populated with the Name, Test ID, Date, and Location for each student, or does it get populated as data is entered in sheet 2?
3. Are you expecting real-time updating? In other words, do you expect the 'desired output' to be created each time data is entered into table 2? Or will it be updated as a batch process? (i.e. someone runs a macro periodically to create the desired output?
 
Upvote 0
Ok - I think we're getting there :-). A few more questions.

1. The 'Desired Output Example' table that you show, is that a different sheet, or are you updating sheet 1 with the data to make it look like that?
2. What does sheet 1 actually contain? Is it pre-populated with the Name, Test ID, Date, and Location for each student, or does it get populated as data is entered in sheet 2?
3. Are you expecting real-time updating? In other words, do you expect the 'desired output' to be created each time data is entered into table 2? Or will it be updated as a batch process? (i.e. someone runs a macro periodically to create the desired output?

Hello again ramulose
1. I'm just updating sheet 1 with the data to make it look like that. Ideally Column A(Form Entry ID) of Sheet 1 which is currently blank, would contain the correct formula.
2. Sheet 1 is pre-populated with the Name, Test ID, Date, and Location for each student
3. I'm expecting real time updating
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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