ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find Method (https://www.excelbanter.com/excel-programming/353340-find-method.html)

Snowy

Find Method
 
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,


Bob Phillips[_6_]

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,




Snowy

Find Method
 
Hello Bob,

Thank you,
Code is working.

Regards,
Swapnil Jiwane



All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com