+ Reply to Thread
Results 1 to 3 of 3

match not being found, when it is there

  1. #1
    Registered User
    Join Date
    09-24-2003
    Posts
    62

    match not being found, when it is there

    I am using this code to to search thru Col I of a worksheet, if a match is found it should place textbox values on the same row, but it is not. it is putting them on a new row as if the match cannot be found, but there is a match i use to see if i have the code right.

    I am guessing it has to do with textbox1's value sometimes being a number (my test is 53953) and on the worksheet I get , col. I is formatted general, with some cells having all numbers(like my test) and other cells having numbers with letters like 345BC12.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Anyone know why?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Zygoid,

    The problem is how you are referencing SrcRange when there is a match. Since Match returns the relative position in the array, and in this case that represents the row, you need to use the Item Property of a Range.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    09-24-2003
    Posts
    62
    thanks Leith!

+ 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