I thought one of you techie guys or gals may be kind enough to help with a little problem that is doing my head in...
I have a need to enter some text and get Excel do do a vlookup to a Table Array in a Named Range on another sheet and return the value from the column 3 to the adjoining cell on the first sheet.
All this I can do and it works fine, the problem I have is that if the data I have entered is not found Excel returns the value of what it thinks is the closest match. This is no good as I may not pick up the error.
What I would like to achieve is for a "0" value to be returned where the text is not a match (it does not have to be case sensitive and will sometimes contain spaces).
Here is the formula I am using currently:
=IF(E4=0,0,VLOOKUP(E4,DISTANCE,3))
Where E4 contains the data to be looked up
Distance is the Named Range containing the Table Array
I am using 0 rather than "" because I then need to sum the returned values.
It is probably blindingly obvious but I have been looking at it for so long now I can't see the wood for the trees! [?]
Any ideas?
Thanks.
Barry.
I have a need to enter some text and get Excel do do a vlookup to a Table Array in a Named Range on another sheet and return the value from the column 3 to the adjoining cell on the first sheet.
All this I can do and it works fine, the problem I have is that if the data I have entered is not found Excel returns the value of what it thinks is the closest match. This is no good as I may not pick up the error.
What I would like to achieve is for a "0" value to be returned where the text is not a match (it does not have to be case sensitive and will sometimes contain spaces).
Here is the formula I am using currently:
=IF(E4=0,0,VLOOKUP(E4,DISTANCE,3))
Where E4 contains the data to be looked up
Distance is the Named Range containing the Table Array
I am using 0 rather than "" because I then need to sum the returned values.
It is probably blindingly obvious but I have been looking at it for so long now I can't see the wood for the trees! [?]
Any ideas?
Thanks.
Barry.