Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

determine the column where a cell was found

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
usadream - 24 Mar 2006 12:20 GMT
Hi all,

I have a find that returns the range of a cell where the search-value
is found. does anyone know how i can determine the column where this
cell is located?

Code:
--------------------
               Set teamNameRng = searchRng.Find(What:=tempTeamName, _
 After:=startRng, _
 Lookat:=xlWhole, _
 LookIn:=xlFormulas, _
 SearchOrder:=xlByColumns, _
 SearchDirection:=xlNext, _
 MatchCase:=False)
--------------------

Than a lot in advance
regards
thomas

Signature

usadream

Norman Jones - 24 Mar 2006 12:36 GMT
Hi USADream,

Try:

Dim myCol as long

     myCol = teamNameRng.Column

---
Regards,
Norman

> Hi all,
>
[quoted text clipped - 16 lines]
> regards
> thomas
usadream - 24 Mar 2006 14:24 GMT
Hi,

thanx a lot for your reply:
now ur solution returns my the number of the column, but in the end,
what i need is defining a range in this column, so for e.g. if

Code:
--------------------
   myCol = teamNameRng.Column
--------------------
--> myCol = 11

then i should be able to define a range like this:

Code:
--------------------
   Set destrange = activeSheet.Range("myCol7 : myCol146")
--------------------

where 7 and 146 are start and end rows..

does anyone know the syntax for this?

help apreciated, thanx
thomas

Signature

usadream

usadream - 24 Mar 2006 14:55 GMT
nevermind, i found it out :-)

Signature

usadream

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.