Thread: VLOOKUP
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default VLOOKUP

The general form would be:

=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),"not
present",vlookup_2,vlookup_1))

where vlookup_1 is your first VLOOKUP formula and vlookup_2 your
second. You can make the message "" if you want it to appear empty
with no matches.

Hope this helps.

Pete

On Jul 5, 6:50 pm, kyoshirou
wrote:
I wan do a 2nd check but if result not found, the searchResult should return
empty.



"Dave Peterson" wrote:
So you want to check a couple of different tables?


If the match isn't found in the first table, then check the second table?


=if(not(isna(vlookup(firsttableformula))),vlookup( firsttableformula),vlooku*p(secondtableformula)))


kyoshirou wrote:


Hi Dave,
i trying that on formula in a worksheet.
I get what you trying to help me.
It works when i seach a valid or invalid data in the search cell.


But is it possible if i make another search inside the cell, if the data
cannnot be found, it will auto clear the first search results. Coz right now,
the old serch result will be still there. Do i need to use marco?


"Dave Peterson" wrote:


Maybe:


=if(isna(vlookup(...)),"Invalid data entered",vlookup(...))


Is this for a macro/VBA or a formula in a worksheet?


kyoshirou wrote:


i mean when i have this:
MsgBox "Invalid Data Entered"
it will gives user a error msg when invalid search is entered.


Can that MsgBox "Invalid Data Entered" be used inside VLOOKUP togther?
Coz right now, i do no use any "Search" button to activate the code.


"Dave Peterson" wrote:


I don't understand the comment.


kyoshirou wrote:


currently if i search a valid data, it will shows the result.
But if i search again with an invalid data, the cells cant reflect blank or
look blank.


"Dave Peterson" wrote:


You can't make the cells empty, but you can make them look blank.


=if(isna(vlookup(...)),"",vlookup(...))
or in xl2007
=iferror(vlookup(...),"")


kyoshirou wrote:


i trying to use this forumla:
=VLOOKUP


if unable to find out the values, can the data cells auto set to blank?


--


Dave Peterson


--


Dave Peterson


--


Dave Peterson


--


Dave Peterson- Hide quoted text -


- Show quoted text -