none
Search within a String to see if a sequence appears RRS feed

  • Question

  • Is there anyway to search within a string to see if a sequence appears. The exact location is unknown. For example:

    xxxx29xxxxx

    xx29xxxxxxx

    should come up as a True hit if 29 is term we want to search

    Monday, November 20, 2017 11:18 PM

All replies

  • Use the Instr function in Visual Basic!

    Per Almgren

    Monday, November 20, 2017 11:39 PM
  • As well as the Instr function as Per suggested, you can also use the Like operator. See Like and Instr in VBA help and the examples given for both.
    Tuesday, November 21, 2017 5:48 PM
    Moderator