ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find cell in particular column (https://www.excelbanter.com/excel-programming/324663-find-cell-particular-column.html)

R.VENKATARAMAN

find cell in particular column
 
i have the same string(or number) in all the columns.
I want to find and activate the string or number in a particular column for
e.g only in column B.
ideas please







Tom Ogilvy

find cell in particular column
 
Dim rng as Range, rng1 as Range
Dim fAddr as String
with columns(2).Cells
set rng = .find("number")
if not rng is nothing then
fAddr = rng1.Address
Do
if rng1 is nothing then
set rng1 = rng
else
set rng1 = union(rng1,rng)
end if
set rng = .FindNext(rng)
Loop until rng.Address = fAddr
End with
if nt rng1 is nothing then
rng1.Select
End if

--
Regards,
Tom Ogilvy


"R.VENKATARAMAN" wrote in message
...
i have the same string(or number) in all the columns.
I want to find and activate the string or number in a particular column

for
e.g only in column B.
ideas please









R.VENKATARAMAN

find cell in particular column
 
than you very much. shall use the sub

Tom Ogilvy wrote in message
...
Dim rng as Range, rng1 as Range
Dim fAddr as String
with columns(2).Cells
set rng = .find("number")
if not rng is nothing then
fAddr = rng1.Address
Do
if rng1 is nothing then
set rng1 = rng
else
set rng1 = union(rng1,rng)
end if
set rng = .FindNext(rng)
Loop until rng.Address = fAddr
End with
if nt rng1 is nothing then
rng1.Select
End if

--
Regards,
Tom Ogilvy


"R.VENKATARAMAN" wrote in message
...
i have the same string(or number) in all the columns.
I want to find and activate the string or number in a particular column

for
e.g only in column B.
ideas please












All times are GMT +1. The time now is 08:49 PM.

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