Thread: Find Method
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Find Method

On a userform?

sCity = "ANCHORAGE"
Listbox1.Clear
For Each cell In Worksheets("Sheet1").Range("A1:A100")
If cell.value = sCity Then
Listbox1.AddItem cell.Offset(0,1).Value
Next cell
Next cell

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Snowy" wrote in message
ups.com...
Hello All,

I have a data of City & Zip Codes. I want to find out Zip Codes of same
city if the city name occures more than one & display that Zip Codes in
List Box.

For E.g

ANCHORAGE is the city Name and it has Two Zip Codes like 97205 & 97206
I want to find ANCHORAGE city & related Zip Codes & display that zip
codes in list box.


Thanks,