+ Reply to Thread
Results 1 to 4 of 4

Using Find to locate data.

  1. #1
    Forum Contributor
    Join Date
    05-31-2013
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2010
    Posts
    164

    Using Find to locate data.

    Greetings all,

    I wrote the following script to find an entry in a long list based on two values found in cells V12 & W12. Essentially, W12 contains either "Last Name", or "First Name", while V12 contains the actual text that needs to be found. Based on the entry in W12 it'll select a different column to search for a match to the V12 data. When I tested this code, it works fine when searching for "First Name", but constantly fails to find any match when searching for "Last Name". There is no error code, it simply fails to find any match, valid or not.

    Please Login or Register  to view this content.
    Thanks in advance.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Using Find to locate data.

    Probably, this is the problem

    Change
    Range(ActiveCell.Offset(0, 5)).Select
    to
    Please Login or Register  to view this content.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Using Find to locate data.

    This seems to work as well,

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    05-31-2013
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: Using Find to locate data.

    Thanks! Such a simple error.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA - Find/Locate Cell Macro
    By clprdctn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2015, 12:01 PM
  2. Locate Value, then find a value 18 columns to right in same row
    By JasonTheLucky in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2014, 09:00 PM
  3. Find and Locate Option
    By fadym in forum Excel General
    Replies: 6
    Last Post: 11-10-2012, 05:42 PM
  4. Can't get Cells.Find to locate integers
    By SJB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2009, 10:39 AM
  5. [SOLVED] Using FIND function to locate space between first and last name
    By Dennis_in_nh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2006, 03:20 PM
  6. USING EDIT FIND to locate cell references
    By Ron Wilson in forum Excel General
    Replies: 3
    Last Post: 09-15-2005, 09:05 PM
  7. Find and Locate Macro
    By abeard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2005, 11:29 AM

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