+ Reply to Thread
Results 1 to 4 of 4

determine the column where a cell was found

  1. #1
    Registered User
    Join Date
    03-22-2006
    Posts
    11

    determine the column where a cell was found

    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?

    Please Login or Register  to view this content.
    Than a lot in advance
    regards
    thomas

  2. #2
    Norman Jones
    Guest

    Re: determine the column where a cell was found

    Hi USADream,

    Try:

    Dim myCol as long

    myCol = teamNameRng.Column


    ---
    Regards,
    Norman



    "usadream" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >
    >
    > --
    > usadream
    > ------------------------------------------------------------------------
    > usadream's Profile:
    > http://www.excelforum.com/member.php...o&userid=32703
    > View this thread: http://www.excelforum.com/showthread...hreadid=526050
    >




  3. #3
    Registered User
    Join Date
    03-22-2006
    Posts
    11
    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

    Please Login or Register  to view this content.
    --> myCol = 11

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

    Please Login or Register  to view this content.
    where 7 and 146 are start and end rows..

    does anyone know the syntax for this?

    help apreciated, thanx
    thomas

  4. #4
    Registered User
    Join Date
    03-22-2006
    Posts
    11
    nevermind, i found it out :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1