+ Reply to Thread
Results 1 to 7 of 7

find loop---looking for a number. works fine with letters

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    find loop---looking for a number. works fine with letters

    Okay, should be a quick fix, but my bug eyes are tired of looking at this. I need to find a number I know is in column r:t. I have attached the first code that looks for something in column a:e and it works fine. I have tried for 4 days now to modify it to work with column r:t and looking for a number (a phone number) . Can't get it to work. Please help. What am I missing?

    This one works:
    Please Login or Register  to view this content.
    This one doesn't:
    Please Login or Register  to view this content.
    the lcount variable is strictly me testing it.
    Foundcell consistently finds "nothing"!?!?!?!?!?
    Clearly I am missing something.

    Thank you.

  2. #2
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: find loop---looking for a number. works fine with letters

    Nobody? Anybody? Pleeeeeaaaaase?! Can not figure this one out.

  3. #3
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: find loop---looking for a number. works fine with letters

    They look like rather different codes to me. There's a lot more changes than just changing cols a:e to r:t.
    If you want to continue on the lines you're using, why not just change a:e to r:t in the first (working?) code, with only consequent other changes?

  4. #4
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: find loop---looking for a number. works fine with letters

    Thank you for the response Kalak. I did just that. The version above is just one of the many iterations I tried. I know it's an "integer" problem. I am looking up phone numbers in column r:t. I just can't figure out how to incorporate an integer into my code. "a" is essentially a phone number located in "ws1.range ("r2998"). the working code looks up string and works fine. Numbers are the issue. If i change something to "apple" in the non working code, it finds it.

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: find loop---looking for a number. works fine with letters

    OK. While running the following code:
    Foundcell is "nothing".
    "a" = exactly what I am looking for in column r:t.
    Which leads me to believe that the error in finding the number is related to the range object of "foundcell"
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: find loop---looking for a number. works fine with letters

    *****************
    Last edited by Dabbler39; 06-22-2013 at 06:43 PM. Reason: double post by accident

  7. #7
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: find loop---looking for a number. works fine with letters

    Finally figured it out. Only took me two weeks:
    changed
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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