vlookup

darice

New Member
Joined
Jun 19, 2011
Messages
13
Hi can anyone help me i was wondering if it was possible to use Vlookup to search column A and b for a word and give whatever is 4 columns along back as the answer for eg.
If the word is not in cell A or B i want the answer to be blank.
Hope someone understands what i am on about and can help.
:)
 
that works absolutely perfect and exactly what i was after the only one other thing is i want it to search for the word in the column and return the answer so many cells along. so not just search that one cell but two whole columns. i really appreciate your help thanks heaps
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
that works absolutely perfect and exactly what i was after the only one other thing is i want it to search for the word in the column and return the answer so many cells along. so not just search that one cell but two whole columns. i really appreciate your help thanks heaps
See if this is what you had in mind:

Book1
ABCDE
2ratmatch1stuffmatch10match16
3batmatch2loudmatch11_
4smatmatch3somematch12_
5latmatch4morematch13_
6XXXmatch5bigmatch14_
7tratmatch6badmatch15_
8fatmatch7catmatch16_
9hatmatch8gladmatch17_
10gatmatch9madmatch18_
Sheet1

Formula entered in E2:

=IF(COUNT(MATCH("cat",A:A,0)),INDEX(B:B,MATCH("cat",A:A,0)),IF(COUNT(MATCH("cat",C:C,0)),INDEX(D:D,MATCH("cat",C:C,0)),""))
 
Upvote 0
Hi this is not quite what I was after I want if in G1 said the word cat it would display the word next to cat or so many cells along in the square that has the formula or if g1 had the word goat it would search for goat in the table and give the result either next to goat or so many cells after.
The answer must be displayed in the cell with the formula if that makes sense :( hopefully I'm explaining this ok
 
Upvote 0
Like in the table you posted, the answer would go in E2 but it would look for whatever word is in G2. If G2 said lamb then that's what Cell E2 would search for and return and result for eg. Seven cells along from that answer and display it in E2
 
Upvote 0
Like in the table you posted, the answer would go in E2 but it would look for whatever word is in G2. If G2 said lamb then that's what Cell E2 would search for and return and result for eg. Seven cells along from that answer and display it in E2
What does "cells along" mean?
 
Upvote 0
Just ignore that bit if it can just put the word that is right next to it in the same column that would be excellent. So if the formula was in E1 and it asked to search for the word that is in G1 in the table and when it finds the word in the table it returns it with whatever is the word next to it in the row.

So if g1 said frog it would search for frog in the table and put the word next to frog in E1.

I must be so **** at explaining lol
 
Upvote 0
So your formula was great but I want it to search for whatever word is in G2 not cat but if G2 said cat it would search for cat in the table but if G2 said bird it would search for bird.
 
Upvote 0
So your formula was great but I want it to search for whatever word is in G2 not cat but if G2 said cat it would search for cat in the table but if G2 said bird it would search for bird.
OK, then all you need to do is replace each instance of "cat" with the cell reference G2:

=IF(COUNT(MATCH(G2,A:A,0)),INDEX(B:B,MATCH(G2,A:A,0)),IF(COUNT(MATCH(G2,C:C,0)),INDEX(D:D,MATCH(G2,C:C,0)),""))
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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