Excel - Vlookup - multiple conditions - textual data

rosieribbons

New Member
Joined
Aug 8, 2012
Messages
16
Hi Everybody.

Was wondering if anyone knew how to do the following (apologies if my excel jargon is off, I'm not what you'd call a pro!)

OK so my situation is this. I'm working with a database that holds information on individuals backgrounds. At the moment I'm looking at education history. I have pulled off a list which details what the database currently says each individual has specified as their degree, but they are all worded slightly differently, and I need to introduce some consistency into the wording to allow us to search and sort the data better.
So I've got sheet1, which has a list of all the unique ways a degree is listed within the database, and an adjacent column which specifies what I want to change it to.
And in sheet2 I have a list of serial numbers for the individual records, and adjacent to that, a column detailing the unique degree listings.

So I need to find a way to tell excel "when you find X in column 2 of sheet 2, change it to Y from sheet 1 column 2, but if you don't find X don't do anything. And if you find Z in column 2 of sheet 2, change it to F from sheet 1 column 2, but if you don't find Z don't do anything".....

BUT I have about 2,500 different conditions that I need to apply at the same time.

Does that make sense? and can anyone suggest a way to achieve this? a friend suggested Vlookup but I can't seem to find any evidence that Vlookup can apply such a large volume of conditions simultaneously. Also all the data I'm working with is textual rather than numerical and I can't find much on how to make that work. I have 20,000 records to amend, I really don't want to do them one at a time!

thanks,

Rosie
 
Hallo and welcome.
Could you post a sample of your data?
You can download and install two of the following programs:
HTLMaker
or
Excel Jeanie

or when using Internet Explorer just put borders around your data in Excel and copy those cells into your post.
 
Upvote 0
I wish I could.... however our data policy is very strict- I'm not allowed to post anything anywhere, even if it's meaningless to 'the outside world'!
 
Upvote 0
[TABLE="width: 600"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Serial
[/TD]
[TD]Current Course Name
[/TD]
[TD]New Course Name[/TD]
[/TR]
[TR]
[TD="align: right"]112233[/TD]
[TD]English And Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]454487[/TD]
[TD]English And Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]659855[/TD]
[TD]English And Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]323136[/TD]
[TD]English And Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]495782[/TD]
[TD]English, Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]363599[/TD]
[TD]English And Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]121266[/TD]
[TD]English And Criminology[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]558897[/TD]
[TD]Criminology and English[/TD]
[TD]Criminology & English[/TD]
[/TR]
[TR]
[TD="align: right"]223344[/TD]
[TD]Management, Business Admin[/TD]
[TD]Business Administration & Management[/TD]
[/TR]
[TR]
[TD="align: right"]656688[/TD]
[TD]Management and business Administration[/TD]
[TD]Business Administration & Management[/TD]
[/TR]
[TR]
[TD="align: right"]331332[/TD]
[TD]BA&M[/TD]
[TD]Business Administration & Management[/TD]
[/TR]
[TR]
[TD="align: right"]569874[/TD]
[TD]BA Management and business admin[/TD]
[TD]Business Administration & Management[/TD]
[/TR]
[TR]
[TD="align: right"]653121[/TD]
[TD]Management, Business Admin[/TD]
[TD]Business Administration & Management[/TD]
[/TR]
[TR]
[TD="align: right"]554599[/TD]
[TD]Business Administration and management[/TD]
[TD]Business Administration & Management[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 600"]
<colgroup><col><col><col></colgroup><tbody>[TR]

[/TR]
[TR]
[/TR]
[TR]

[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][TABLE="width: 600"]
<tbody>[TR]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
From your example, there is only one condition, if the course name can be found in the lookup table, then it be used. If I understood this correctly, something like the following should do the trick:
= IFERROR(VLOOKUP(CurrentCourseNameColumn, YourLookupTableRange, 2, FALSE), CurrentCourseNameColumn))

Do you have examples of what the other "2500 conditions" would look like?
 
Upvote 0
[TABLE="width: 1286"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Computer Science & Music[/TD]
[TD]Computer Science & Music[/TD]
[/TR]
[TR]
[TD]Computer Science & Music Technology[/TD]
[TD]Computer Science & Music Technology[/TD]
[/TR]
[TR]
[TD]Computer Science & Neuroscience[/TD]
[TD]Computer Science & Neuroscience[/TD]
[/TR]
[TR]
[TD]Computer Science & Philosophy[/TD]
[TD]Computer Science & Philosophy[/TD]
[/TR]
[TR]
[TD]Computer Science AND Physical Geography
[/TD]
[TD]Computer Science & Physical Geography[/TD]
[/TR]
[TR]
[TD]Computer Science & Physics[/TD]
[TD]Computer Science & Physics[/TD]
[/TR]
[TR]
[TD]Computer Science & Psychology[/TD]
[TD]Computer Science & Psychology[/TD]
[/TR]
[TR]
[TD]Computer Science & Sociology[/TD]
[TD]Computer Science & Sociology[/TD]
[/TR]
[TR]
[TD]Computer Science & Statistics[/TD]
[TD]Computer Science & Statistics[/TD]
[/TR]
[TR]
[TD]Computer Science and Visual Arts
[/TD]
[TD]Computer Science & Visual Arts[/TD]
[/TR]
[TR]
[TD]Computer Science with Astrophysics[/TD]
[TD]Computer Science with Astrophysics[/TD]
[/TR]
[TR]
[TD]Computer Science with Forensic Science[/TD]
[TD]Computer Science with Forensic Science[/TD]
[/TR]
[TR]
[TD]Computer Science with Mathematics[/TD]
[TD]Computer Science with Mathematics[/TD]
[/TR]
[TR]
[TD]Computer Science with Physical Geography[/TD]
[TD]Computer Science with Physical Geography[/TD]
[/TR]
[TR]
[TD]Computer Science with Physics[/TD]
[TD]Computer Science with Physics[/TD]
[/TR]
[TR]
[TD]Computer Science with Psychology[/TD]
[TD]Computer Science with Psychology[/TD]
[/TR]
[TR]
[TD]Computer Science, and Business Administration & Music Technology
[/TD]
[TD]Computer Science, Business Administration & Music Technology[/TD]
[/TR]
[TR]
[TD]Computer Science, Electronics & Physics[/TD]
[TD]Computer Science, Electronics & Physics[/TD]
[/TR]
[TR]
[TD]Computer Science, Mathematics & Certificate in Education[/TD]
[TD]Computer Science, Mathematics & Certificate in Education[/TD]
[/TR]
[TR]
[TD]Computer Studies, Physics & Certificate in Education
[/TD]
[TD]Computer Science, Physics & Certificate in Education[/TD]
[/TR]
[TR]
[TD]Computer Studies
[/TD]
[TD]Computer Studies[/TD]
[/TR]
</tbody>[/TABLE]



maybe i used the term 'condition' incorrectly... I meant 2,500 unique original course names with new names to change to.

the other thing I'm wondering is if I have course names like 'Computer Studies' and course names that incorporate that within a longer name, e.g. Computer Studies, Physics Certificate in Education will one overwrite the other? I need it to recognise the whole cell exactly.
 
Upvote 0
VLOOKUP should be able to handle a table of this size. Used with the parameter FALSE, this function will give you an exact match.
 
Upvote 0

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