Vlookup help

GOKULA

New Member
Joined
Nov 8, 2019
Messages
8
Can anyone help me with this. One of my sheets has info on student ID and the class they were in last year. The new sheet has the student id and the class they are enrolled in this year. If they both don't match it should say bad. Sheet two should look like the table below. The range is H2:P1854, H is the ID Column, P is the class Column(for both sheets)
ID
Class
Verification
1234566
Math
=IF(VLOOKUP(H2,'2018 Classes Roster'!$H$2:$P$1854,6,FALSE)=0,"bad","good")
3423443
Math
Good
3422342
Science
Bad
8978989
Science
Bad

<tbody>
</tbody>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
How about
=IF(VLOOKUP(H2,'2018 Classes Roster'!$H$2:$P$1854,6,FALSE)<>P2,"bad","good")
 
Upvote 0
Thanks for the fast response! When I change the class from science to math, it's still returning good.
 
Upvote 0
How about
=IF(VLOOKUP(H2,'2018 Classes Roster'!$H$2:$P$1854,9,FALSE)<>P2,"bad","good")
 
Upvote 0
How about
=IF(VLOOKUP(H2,'2018 Classes Roster'!$H$2:$P$1854,9,FALSE)<>P2,"bad","good")

i made a typo at the start, P is not the class class, M is the class column,

Do i have to select the entire table from the sheet? or can i just select the needed columns??
 
Upvote 0
You can do it like
=IF(VLOOKUP(H2,'2018 Classes Roster'!$H$2:$M$1854,6,FALSE)<>P2,"bad","good")

As long as the last row of the lookup table is row 1854 or less.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
This the first sheet
Student IDCourse ID Fall
M82922929A&S 001
M68669689A&S 012
M78666687A&S 035
M28262728A&S 055

<tbody>
</tbody>

You have helped me create a formula that would identify a mismatch happening.
Student IDCourse ID SpringStatus
M82922929A&S 001Good
M68669689A&S 013Bad
M78666687A&S 029Bad

<tbody>
</tbody>
M28262728 A&S 045 Bad

<tbody>
</tbody>

If it shows up bad, i want a formula that would look up another sheet( that looks like below). If fall course was A&S 012 and if then Spring class is A&S 013 it should return good. Similarly for the A&S 045, if the spring course id is any of the 3 in the last row and the fall id was A&S 055, it should return good.

Course ID fallCourse ID spring
A&S 001 A&S 001
A&S 012 A&s 013
A&S 035 A&S 029
A&S 055 A&S 025, 065, 045

<tbody>
</tbody>
 
Upvote 0
As this is now a totally different question, you will need to start a new thread, thanks.
 
Upvote 0

Forum statistics

Threads
1,215,370
Messages
6,124,526
Members
449,169
Latest member
mm424

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