Results 1 to 4 of 4

Thread: A simple "find" syntax question

  1. #1

    A simple "find" syntax question



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Please help me to understand what is wrong with my code syntax in blue below? I only want to search Column D for the contents of WR. I know it is syntax but I just do not know VBA well enough to know what is wrong with it. Thank you in advance.



    Code:
    Dim WR as string
    Dim WRwhole As String
    
    WR = Right(WRwhole, 7) ' Take the left most 7 characters from the job number
                   
            Set GCell = ActiveSheet.Range("$D$1").Select.EntireColumn.Find(WR)

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    742
    Articles
    0
    Excel Version
    Excel 2010 64bit
    should have a look at this page

    http://www.rondebruin.nl/win/s9/win006.htm

  3. #3
    Conjurer snb's Avatar
    Join Date
    May 2013
    Posts
    374
    Articles
    0
    Excel Version
    2020
    I'd use:

    Code:
    Sub M_snb()
       with activesheet.columns(4).find(left(Jobnumber,7))
          x0=.address
       end with 
    End Sub


  4. #4
    Your fix was so easy. Thank you so much for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •