+ Reply to Thread
Results 1 to 5 of 5

Find a cell without selecting/moving the cursor

  1. #1
    Registered User
    Join Date
    11-05-2020
    Location
    Leics
    MS-Off Ver
    Office 365
    Posts
    28

    Find a cell without selecting/moving the cursor

    Hi. Im still struggling with what should be a simple find function
    I have to add a gazillion new accounts per day and check and amend any existing duplicates
    I currently have

    Please Login or Register  to view this content.
    Which works fine. I add the new account, the code finds any existing duplicate and takes my cursor there for amend

    My problem is that after typing in an account, I cursor down to add the next value, and if the search is unsuccessful it shifts the cursor back up into the original cell which is doubling my work
    So basically I need to something more complex pseudo code

    acell = activecell ' save new cell position which has shifted by the time this fires

    fcell = find target cell ' save any duplicate found (i have trouble just completing the search without actually selecting/moving the cursor, I just want to store the results of the find

    if fcell then select fcell.select else acell.select

    Find a cell without selecting/moving the cursor

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Find a cell without selecting/moving the cursor

    By Office 10 do you mean Office 2010? If so, please update your profile. If you have updated Office, then of course update it with your latest version. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Find a cell without selecting/moving the cursor

    Add a variable
    e.g
    Please Login or Register  to view this content.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Find a cell without selecting/moving the cursor

    And then test if r.address = Target.address; if not, select it.
    Rory

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Find a cell without selecting/moving the cursor

    Try this

    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Automatically Moving the Cursor to Next Cell
    By sathishkm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2014, 01:25 AM
  2. [SOLVED] moving cursor to required cell
    By karen waghorn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-31-2013, 10:14 AM
  3. VBA for selecting a sheet and having cursor on cell a1
    By ravergirl7216 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2010, 02:01 PM
  4. Cursor & Cell not Moving?
    By desertdude1 in forum Excel General
    Replies: 3
    Last Post: 04-27-2009, 10:08 AM
  5. Moving cursor along one cell
    By tony0710 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2009, 04:16 AM
  6. [SOLVED] VBA for tab order/moving cursor to a certain cell
    By Frederic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2005, 11:05 AM
  7. Replies: 8
    Last Post: 05-13-2005, 04:06 PM

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