ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to search a range for a suburb in a large range (https://www.excelbanter.com/excel-programming/332492-how-search-range-suburb-large-range.html)

Bogan..

How to search a range for a suburb in a large range
 
How to search a range for asuburb that if found could contain up to 50
different corresponding post codes. After its found how can it be checked
againsts an example.

William Benson

How to search a range for a suburb in a large range
 
Can you provide more details? What does your data look like (what is in
rows, cols)?

"Bogan.." wrote in message
...
How to search a range for asuburb that if found could contain up to 50
different corresponding post codes. After its found how can it be checked
againsts an example.




Tom Ogilvy

How to search a range for a suburb in a large range
 
set rng = Range("A1:A50").Find( "string")

set rng1 = rng.offset(0,1).Resize(1,50)

for each cell in rng1
if cell.Value = "ExampleValue" then
msgbox "Found"
end if
Next

--
Regards,
Tom Ogilvy





"Bogan.." wrote in message
...
How to search a range for asuburb that if found could contain up to 50
different corresponding post codes. After its found how can it be checked
againsts an example.





All times are GMT +1. The time now is 03:55 PM.

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