I need to come up with a formula that will use vlookup if the cell contains data, if not leave the cell blank. I also need it to use vlookup but if it does not find a match, output the contents of the original cell. Can it even be done?
I need to come up with a formula that will use vlookup if the cell contains data, if not leave the cell blank. I also need it to use vlookup but if it does not find a match, output the contents of the original cell. Can it even be done?
If you put a formula in the cell it will overwrite the original contents, so how do you expect to get that back?
You can avoid the #N/A error in XL2007 by using this:
=IFERROR( your_vlookup_formula, "")
Add the items in red around your existing formula.
Hope this helps.
Pete
As an example...
=IF(A1<>"",IFERROR(VLOOKUP(A1,$E$1:$F$20,2,0),A1),"")
HTH
Regards, Jeff
can you post an example? Basically, you'll want an iferror statement to get tird of the #N/A and an if statement to see if a match is made.
Jeffrey that worked perfectly, thanks for your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks