+ Reply to Thread
Results 1 to 4 of 4

Find exact partial string in range

  1. #1
    Registered User
    Join Date
    12-01-2017
    Location
    Weil am Rhein, Germany
    MS-Off Ver
    Professional Plus 2016
    Posts
    2

    Find exact partial string in range

    Rookie here, please excuse my ignorance. Also, I am sure I would have found a relevant thread in the sea of knowledge here, but like in the Hitchhiker`s Guide, formulating the question (and thus researching it) is my bigger issue.

    I am trying to set up a formula to find a string of text, and return a numerical value of the number of hits:

    =COUNTIF('Copy Amenity VALUES Here'!A1:T200,"*$50*")

    This works well, the problem is it only works when using wildcards, but then it also counts longer strings containing $50, i.e. $500, or $5000.

    I have also tried:

    =SUMPRODUCT(--ISNUMBER(SEARCH({"$50"}, 'Copy Amenity VALUES Here'!A1:T200))), which has the same issue.

    Case sensitivity is not a problem. If I could e.g. specify the number of characters I am looking for, that could also solve the issue.

    I am sure I must be missing some basic knowledge here - these functions are kind of useless if for instance "*hat*" gives a hit for the word "hate".

    Any help is much appreciated.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Find exact partial string in range

    Hello and welcome to the forum.

    What about something like this:

    =COUNTIF('Copy Amenity VALUES Here'!A1:T200,"*$50 *")

    That will count the number of cells in the range A1:T200 that contain "$50 ".

    This assumes that "$50" is somewhere in a sentence other than the end.

    If "$50" can be at the end of a sentence (thus having a period instead of a space after it), try this:

    =SUM(COUNTIF('Copy Amenity VALUES Here'!A1:T200,{"*$50 *","*$50.*")

    If neither of these produce the expected result, consider uploading a small representative sample of your workbook along with the desired result.

  3. #3
    Registered User
    Join Date
    12-01-2017
    Location
    Weil am Rhein, Germany
    MS-Off Ver
    Professional Plus 2016
    Posts
    2

    Re: Find exact partial string in range

    Thank you - simply leaving a space solves my problem, and if later needed, I can work with your second version

    Again, many thanks for the fast reply, you have made my day!

    Have a fantastic weekend.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Find exact partial string in range

    You're welcome, happy to help.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Enjoy your weekend.

+ 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. [SOLVED] find both exact and partial matches
    By ruub7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2017, 06:31 AM
  2. Replies: 14
    Last Post: 04-21-2017, 04:56 PM
  3. need formula or vba to find exact string through list and find exact correct string
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2016, 04:12 AM
  4. Replies: 3
    Last Post: 01-22-2015, 06:21 PM
  5. To Sort exact and partial exact match for a single column.
    By Jagdev in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2014, 05:08 AM
  6. VBA Find Partial String in String Array and Output the Found String Array Value
    By scherich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2014, 11:20 AM
  7. [SOLVED] Vlookup, Match (Search or Find) partial string within string in a Cell
    By dluhut in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-28-2013, 12:40 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