Results 1 to 2 of 2

VBA precise search values

Threaded View

  1. #1
    Registered User
    Join Date
    01-08-2019
    Location
    UK
    MS-Off Ver
    365
    Posts
    2

    VBA precise search values

    Good morning,

    I am currently using the following to locate a specific value "BFHOE" which is the name of a shift in a list - then copy the contents of a cell to the left of this value to another location. The problem I'm having is that this code locates BFHOE which is correct but also then finds BFHOEN which is a totally different shift and this is the one that is used to find the value that ends up being copied into the destination cell as it appears in the list after the intended search term.


    Is there a way I can use the same code but define that I want only the exact term "BFHOE" to be located?

    For Each cel In SrchRng
        If InStr(1, cel.Value, "BFHOE") > 0 Then
            cel.Offset(0, -3).Copy Range("F41:G41")
        End If

    Thank you in advance for any advice you can offer.


    Jon
    Last edited by BlackenedEDIT; 01-01-2020 at 01:20 PM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Precise Printing with VBA
    By tryingtolearnExcel_1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2019, 12:45 PM
  2. What function should be used to give a precise value.
    By thanhvanchi in forum Excel General
    Replies: 2
    Last Post: 12-08-2016, 06:26 AM
  3. Keeping a currency precise
    By Tall Tony in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2016, 03:40 PM
  4. ServerXMLHttp precise point of failure
    By vientito in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2014, 09:55 PM
  5. Looking for a precise value in a table (matrix) ???
    By Sokol in forum Excel General
    Replies: 2
    Last Post: 01-17-2011, 07:23 AM
  6. Precise Printing
    By LisaGreen in forum Excel General
    Replies: 1
    Last Post: 12-02-2007, 02:29 PM
  7. Capture Value at precise time
    By deano48 in forum Excel General
    Replies: 1
    Last Post: 07-08-2007, 06:39 PM

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