View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Ildhund Ildhund is offline
external usenet poster
 
Posts: 6
Default how do i use VLOOKUP to find text and return a number?

Does it help if you put the last parameter in your lookup formula - i.e.
an extra ",0" without the quotation marks immediately before the final
parentheses "))"? This should force vlookup to find only exact matches.

If you select the cell containing the formula and then click the "="
sign to the left of the formula bar above the spreadsheet, you should
get a dialogue box showing what you have to - or are able to - specify.
If you then click within the word VLOOKUP in the formula bar, you should
see the box pertaining to that function with its four parameter fields.
Putting a "1" or a "0" in the last box may give you different results,
depending on how the lookup data are organized.

Noel


roza_j2002 wrote

thanks for your help. but it's still only coming up with the last
postcode.

"mr_teacher" wrote:


If you add an extra column in C then in C3 (or whichever row has the
first postcode in) use the formula =A3 and copy this down the column
as
far as needed.

Then you can use your formula with a slight change
=IF(B5<"",VLOOKUP(B5,data!$b$3:$f$1002,2))

You will also need to change your other formula slightly to allow for
the added column
=IF(B10="","",VLOOKUP(B10,data!$A$3:$f$1002,2))

Hope this helps

Regards

Carl
roza_j2002 Wrote:
i'm actually trying to make a postcode search. Entering the
postcode,
it
comes up with the suburb name fine.
But when i know the suburb name, but want to find the postcode, the
only
thing i get is #N/A ... Here is the string (used for both)

COLUMN A is the postcodes
COLUMN B is the suburbs
*The one that works*
=IF(B10="","",VLOOKUP(B10,data!$A$3:$E$1002,2))
*The one that doesnt* =IF(B5<"",VLOOKUP(B5,data!$A$3:$E$1002,1))



--
mr_teacher
------------------------------------------------------------------------
mr_teacher's Profile:
http://www.excelforum.com/member.php...o&userid=34352
View this thread:
http://www.excelforum.com/showthread...hreadid=570584