+ Reply to Thread
Results 1 to 7 of 7

Using Find and Returning the Column Number of the Found Cell

  1. #1
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Using Find and Returning the Column Number of the Found Cell

    Hello,

    I am trying to lookup a text string in a row and return the column number of that string. Here is my code:

    Please Login or Register  to view this content.
    Frustratingly, it sometimes works, but other times does not. I am assuming my code is not sound. Any help is greatly appreciated. Thanks.

    Steve
    A VBA novice, excited to learn!

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Using Find and Returning the Column Number of the Found Cell

    Hi,

    Try
    Please Login or Register  to view this content.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Re: Using Find and Returning the Column Number of the Found Cell

    Charles,

    Your code works wonderfully. Do you think my issue was trying to define to many components of the Find function?

    PS: I don't know if you remember, but you helped me out immensely about a year ago. Many thanks!

  4. #4
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Using Find and Returning the Column Number of the Found Cell

    Helped me out to.


    I just need to add a countif into the message box code to show me how many matching words it finds in my range!


    thankyou.

  5. #5
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Using Find and Returning the Column Number of the Found Cell

    Yes,

    I remember you. All ways happy to help all.
    As for your code you need to see if the Item was found. Hence
    Please Login or Register  to view this content.
    If the item was not found then the code will end.

  6. #6
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Using Find and Returning the Column Number of the Found Cell

    Robotacha2010,

    Glade it helped you. And thanks for the rep from you and Steve.

  7. #7
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Re: Using Find and Returning the Column Number of the Found Cell

    Makes sense. Way to kill 2 birds with one stone, btw!

    No need to thank for the rep, it was well deserved.

+ 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