View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Vlookup and text

textbox2.text =
application.Vlookup(Textbox1.Text,Range("A1").Curr entRegion,2,0)

--
Regards,
Tom Ogilvy

Adam wrote in message
...
Ok, i'm a bit of a newbie and teaching myself as I go along but here is my

problem.

I've got a sheet called data that contain referances and names and

addresses and looks something like this
REFERENCE NAME ADDRESS1 ADDRESS2

POSTCODE TELEPHONE
1 10001A FRED 2 THE STREET THE TOWN

CR0 0123454677
2 10002A BOB 3 OTHER STREET TOWN2

RH1 0123558745
3 20001C ADAM 4 OTHER STREET TOWN3

G34 01415745655
4 10003A SUSAN 5 OTHER PLACE TOWN4

F54 0154555456
ETC....
...
...
1000.......


I want to enter the reference (which is always be both numbers and text)

into textbox1 and pull the other cells into textbox2, 3 & 4 etc using
vlookup.

I've tralled through pages of forums but seem to be getting myself more

confused.

Can someone provide me with the code using vlookup and expain it so that I

can use it correctly in future.

thanks.

Adam