vlookup

Phill W

New Member
Joined
Aug 14, 2009
Messages
25
Can anyone help me set up vlookup, I want to type in different words into one cell to make certain words appear in other cell :

type in A1 - help A2 = thanks
type in A1 - please A2 = sorry
type in A1 - only A2 = me

any help would be much appreciated
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
hi thanks for that, im not having much look setting this formular, is there anything you can do to help me please
 
Upvote 0
type the words you wish to type in to cell A1 into 1 column (for this example Column C starting in cell C1) and the words you wish to return in A2 in the next column (Column D starting in cell D2)

In cell A2, put the following formula

=VLOOKUP(A1,C1:D3,2,0)

This will give you the answer you require when you input one of the words into A1.

:)
 
Upvote 0
Here are few approaches to solve this:


Excel Workbook
ABCDEF
1InputRespond
2pleaseSorryMethod 1InputRespond
3sorryMethod 2helpthanks
4sorryMethod 3pleasesorry
5sorryMethod 4onlyme
Sheet2
#VALUE!
Excel Workbook
EF
2InputRespond
3helpthanks
4pleasesorry
5onlyme
Sheet2
 
Upvote 0
hi thanks for that, im not having much look setting this formular, is there anything you can do to help me please
Create a 2 column table with the keywords in the left column and the word to be returned in the right column:

Book1
FG
1HelpThanks
2PleaseSorry
3OnlyMe
4ThisThat
Sheet2

Then...

A1 = some keyword like Help

Enter this formula in B1:

=VLOOKUP(A1,F1:G4,2,0)
 
Upvote 0
thank you, thats brill, my problem now is if i type in a word not in the colunm N/A appears, can i stop this ?
 
Upvote 0
thank you, thats brill, my problem now is if i type in a word not in the colunm N/A appears, can i stop this ?


If you are using excel 2007 or later, use IFERROR..

Using the formula given by T.Valko as an example...

=IFERROR(VLOOKUP(A1,F1:G4,2,0),"")

This will mean the cell is left blank if there is an error...

For excel 2003 or earlier...

=IF(ISERROR(VLOOKUP(A1,F1:G4,2,0),"",VLOOKUP(A1,F1:G4,2,0))

:)
 
Upvote 0
thank you, thats brill, my problem now is if i type in a word not in the colunm N/A appears, can i stop this ?
What version of Excel are you using?

What result do you want to replace the error?

This will work in Excel 2007 and later and will leave the cell blank:

=IFERROR(VLOOKUP(A1,F1:G4,2,0),"")

This will work in any version of Excel:

=IF(ISNA(MATCH(A1,F1:F4,0)),"",VLOOKUP(A1,F1:G4,2,0))
 
Upvote 0

Forum statistics

Threads
1,224,545
Messages
6,179,432
Members
452,915
Latest member
hannnahheileen

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