+ Reply to Thread
Results 1 to 4 of 4

Find i column and select cell

  1. #1
    Registered User
    Join Date
    06-30-2018
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    42

    Find i column and select cell

    Hi All

    One question, how do I Find a value in A:A99999999 and select the cell if the value are found?

    I have tried this without any luck

    Please Login or Register  to view this content.
    Worksheets("sheet1").Column(1).Find(What:=TextBox3, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False).Select
    Please Login or Register  to view this content.
    Last edited by Vibov; 05-19-2022 at 04:30 AM.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    10 ... 21 - 32 & 64
    Posts
    2,840

    Re: Find i column and select cell

    The obvious issue is the typo ...
    Please Login or Register  to view this content.
    The rest of the statement looks fine.

    However, that will throw an error if the search term is not found. Consider assigning the results of the search to a range and then checking that range is not nothing....

    Please Login or Register  to view this content.
    Last edited by cytop; 05-19-2022 at 03:27 AM.

  3. #3
    Registered User
    Join Date
    06-30-2018
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    42

    Re: Find i column and select cell

    Hi Cytop

    Thanks but it comes with an "run-time error 1004 - Select method of range class failed?

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    10 ... 21 - 32 & 64
    Posts
    2,840

    Re: Find i column and select cell

    It'll also throw an error if Sheet1 is not active and the Find succeeds ...

    Do as I said - assign the results of the search to a Range variable.
    If the range is not nothing after the search then ensure the range Parent sheet is active before selecting the range

+ 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. VBA to find Select next Empty Cell in Column C
    By oneblondebrow in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2017, 04:48 AM
  2. [SOLVED] Find first blank cell in first column of known range, select and delete from that point
    By johnstevens in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-09-2014, 09:41 AM
  3. Find & select 1st blank cell in a range of formulated column cells
    By jnbroek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 09:26 AM
  4. [SOLVED] Find/Select Last Cell in Column
    By msawyer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-10-2013, 12:20 PM
  5. Find and Select the Next Empty Cell in Column A
    By billykiller05 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2009, 01:01 PM
  6. Macro to find a cell then select a column
    By NICKW in forum Excel General
    Replies: 6
    Last Post: 04-09-2007, 12:35 PM
  7. Find Last Cell in Column, Select all cells above it
    By MAYDAY in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2005, 07:01 AM

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