ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vlookup - return exact phrase (https://www.excelbanter.com/excel-discussion-misc-queries/236076-vlookup-return-exact-phrase.html)

duketter

Vlookup - return exact phrase
 
Excel 2007 - I am trying to create a vlookup formula that returns an exact
phrase if there is or is not a match. So far I have this:
=IFERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE),"Manual")

If there is not a match, it correctly returns "Manual" in my cell. However,
if there is a match, I want it to return the word "Auto" in my cell.

Dead.Zone

Vlookup - return exact phrase
 
Here is one solution...

Expand your VLookup to columns B and C. (B:C) In column C, put the word
Auto in every cell (or, alternatively, you could put a different value for
each row.) Then Hide column C. (you could use security to protect the
column, if necessary.) Then, change the column index number in your VLookup
from 1 to 2. When a match is found, you'll see the value in column C. When
it's not found, you'll see your error message.

"duketter" wrote:

Excel 2007 - I am trying to create a vlookup formula that returns an exact
phrase if there is or is not a match. So far I have this:
=IFERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE),"Manual")

If there is not a match, it correctly returns "Manual" in my cell. However,
if there is a match, I want it to return the word "Auto" in my cell.


Jacob Skaria

Vlookup - return exact phrase
 
=IF(ISERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE)),"Manua l","Auto")


If this post helps click Yes
---------------
Jacob Skaria


"duketter" wrote:

Excel 2007 - I am trying to create a vlookup formula that returns an exact
phrase if there is or is not a match. So far I have this:
=IFERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE),"Manual")

If there is not a match, it correctly returns "Manual" in my cell. However,
if there is a match, I want it to return the word "Auto" in my cell.


francis

Vlookup - return exact phrase
 
I don't have 2007, but believe this this should also work in 2007
try
=IF(ISERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE)),"Manua l","Auto")
this will return the text Auto if there is a match otherwise its will give
you Manual
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another



"duketter" wrote:

Excel 2007 - I am trying to create a vlookup formula that returns an exact
phrase if there is or is not a match. So far I have this:
=IFERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE),"Manual")

If there is not a match, it correctly returns "Manual" in my cell. However,
if there is a match, I want it to return the word "Auto" in my cell.


T. Valko

Vlookup - return exact phrase
 
Try this:

=IF(COUNTIF('32pl'!B:B,I5),"Auto","Manual")

--
Biff
Microsoft Excel MVP


"duketter" wrote in message
...
Excel 2007 - I am trying to create a vlookup formula that returns an exact
phrase if there is or is not a match. So far I have this:
=IFERROR(VLOOKUP(I5,'32pl'!B:B,1,FALSE),"Manual")

If there is not a match, it correctly returns "Manual" in my cell.
However,
if there is a match, I want it to return the word "Auto" in my cell.





All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com