ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   An Error return other than #N/A with VLOOKUP (https://www.excelbanter.com/new-users-excel/56185-error-return-other-than-n-vlookup.html)

Gazivaldo

An Error return other than #N/A with VLOOKUP
 
I'm using VLOOKUP to search for an exact match of a cell but when it can't
find a match it returns #N/A. Now, I KNOW, that there sometimes won't be a
match but rather than returning #N/A is it possible for Excel to return a
blank, or better still a shaded cell??

Anne Troy

An Error return other than #N/A with VLOOKUP
 
=if(isna(vlookup(...)),"",vlookup(...))
Then use conditional formatting that if the cells is equal to "", it's
shaded.
(Formulas can't change cell color)
************
Anne Troy
VBA Project Manager
www.OfficeArticles.com

"Gazivaldo" wrote in message
...
I'm using VLOOKUP to search for an exact match of a cell but when it can't
find a match it returns #N/A. Now, I KNOW, that there sometimes won't be
a
match but rather than returning #N/A is it possible for Excel to return a
blank, or better still a shaded cell??




Gazivaldo

An Error return other than #N/A with VLOOKUP
 
Thanks Anne. I've applied your formula and now I'm receiving a blank cell
which is great. However, for some reason the conditional formatting isn't
working. I've done exactly as you've suggested but it doesn't format any of
the blank cells. Any ideas??

"Anne Troy" wrote:

=if(isna(vlookup(...)),"",vlookup(...))
Then use conditional formatting that if the cells is equal to "", it's
shaded.
(Formulas can't change cell color)
************
Anne Troy
VBA Project Manager
www.OfficeArticles.com

"Gazivaldo" wrote in message
...
I'm using VLOOKUP to search for an exact match of a cell but when it can't
find a match it returns #N/A. Now, I KNOW, that there sometimes won't be
a
match but rather than returning #N/A is it possible for Excel to return a
blank, or better still a shaded cell??






All times are GMT +1. The time now is 12:12 PM.

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