Thread: sub for reading
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 sub for reading

use Vlookup

Using a worksheet formula

=Vlookup(pcode,Sheet1!$A$56:$B$208,2,false)

you can do it with VBA as well

res = Application.Vlookup(Range("pcode").Value,
Range("Sheet1!A56:B208"),2,False)

--
Regards,
Tom Ogilvy

"Fernando Duran" wrote in message
...
I have a sheet, that starts in A56, B56 to A208,B208, , in other sheet,
that's the user side, the user enter the Postal code in cell called
PCODE... What I need to do, is able to read, the second column, because,
the first one is the Postal Code, the second is the Zone, I need to
extract this information, using the entry in the PCODE, then I will
manipulate this information in my main program... but forget about the
main, in working fine, I just need to get the information...

A B
A0B 10
A0H 11
etc...

I need the B column, base in the A

Thanks for the ideas

Fernando