1. R

    TRUE or FALSE filldown if contains specific string

    Hi guys, I'm trying to find this specific string "ppl" inside column W and fill down column X with TRUE / FALSE text. However it identifies even "apple" or "people" as TRUE as well. How can i make this code to only detect "ppl"? Thank you in advance :) Sub Sample() Dim LastRow As Long Dim...
  2. R

    InStr with Multiple Text in String

    Hi guys, Currently im try to search a cell if it contain two specific text inside it using InStr function. However it is not working. Anything am I missing here? If InStr(1, (Range("L1").Value), "Hello ") > 0 And InStr(1, (Range("L1").Value), "name ") Then The tresult im loking for should...
  3. 3

    VBA - DO while and filename contains*

    Hi Guys, I have the below code, which looks through a folder for files and copies the data into my open workbook. I need the code to look for filenames only containing a string of ABC, and if the filename contains anything else, then X (The sheet to copy) would be 1 to 2 (Instead of 3 to 3)...
  4. E

    Using Instr function with unknown starting position to search for substring in a cell

    Hi MrExcel and Everyone,~ I hope you're all doing great, fine and well at this time! I need help with the Instr function, or please let me know if a better function exists in Excel/VBA, that would work almost like fuzzy logic to look at data in a cell, and determine if a specific string is...
  5. jmacleary

    See if a string contains any of a list of characters in VBA

    Good morning (or afternoon/evening). I have a vba application using forms and need to validate the user input to ensure none of a set of characters are being input. At the moment the set is )('@=`#~"!,. but this may grow. I was going to create a loop using instr, but wondered if there was a...
  6. DataBlake

    Make InStr with entire cell qualifier

    Is it possible to use InStr to where it will only return the position of a string if the phrase you are looking for is the entire cell. So say for example InStr(1, a(i, j), "err", 1) i want to find "err" in an array and not have it return "Sierra" only if the entire cell is "err" do i want it...
  7. B

    Comparing words in a cell to a fixed list of words

    Greetings, I have a spreadsheet with names and addresses. In the name column, I need to compare all the words to a fixed list of terms, such as "borrower", "homeowner", "LLC", etc. I will be highlighting the row to look at individually. So far, I can get the code to work, but with only one...
  8. A

    instr to get exact match

    I have this line of code, but I thought it was to get exact match. How can I get the exact match? If InStr(1, Cells(RowNum, 1).Value, "BA", vbTextCompare) > 0 Then
  9. Dr. Demento

    Finding the whole word from InStr

    Could someone point me in the direction of a function that once InStr finds a substring, the function returns the entire word? For example, fx_WholeWord("I went to the theater and someone must have turned on the heater", "heat") would return both "theater" and "heater" Thanks y'all.
  10. D

    VBA code to set 2 column Combobox values

    I'm abbreviating my descriptions to paint the picture. I have a userform that has 2 comboboxes on it. cmbPartNumber and cmbAccount cmbAccount is 2 columns populated from a worksheet For each row there is always a value in column 0 and sometimes a value in column 1 Click save on the userform...
  11. L

    Instr substrings

    Hi all, Is it possible to use multiple substrings with inStr? I want to test if the following characters are contained within mystring /, \, ?, %, *. Many Thanks
  12. S

    Dynamic Named Range as Array for AutoFilter not working

    Hey All! I've been searching the forums in vain and am hoping someone out there can help. I have a dynamic named range ("FilterCriteria") and am trying to use it as an array for autofilter. I'd like to see if any of the "FilterCriteria" values appear in each cell in Column H. H is a helper...
  13. B

    Find a string in a range

    I need the fastest way to look across a range of cells where each cell in the range contains a long string to see if any words in a list occurs in any of those cells. The first thing I did of course was to read the range of cells into an array, then I loop through my list (for each item in...
  14. B

    Performance question - string search across many cells

    I have about 10 cells in a row that contain strings. These strings can be null to paragraphs of text. I need to find out if a particular key word exists in any of the cells, for each row through hundreds of thousands of rows, then this gets nested in another loop - so I need this to be fast...
  15. Mackeral

    Solved: Problem with "Instr" when called with an Empty Thread

    If you call "Instr" with a null argument as in "Instr("Whatever","")" you always get back a 1. It should return a 0 indicateing that it didn't match anything. My solution:Function In_Str(Look_In, For_Text) ' Correcting "Instr" function. ' 7/3/18 Created. WML Prog = "In_Str"...
  16. M

    Add text based on date in another cell

    Hello, I was wondering if this was possible to do in vba code. I have a date in cell A15 and A16 ... 3/31/18 and 2/28/18 respectively. In the cells next to the date I need text that will pull the year and then some instr text or it can all be instr. I'm looking to type a file name like...
  17. F

    InStr Function

    Dim LastRow As LongDim erow As Long Dim i As Long Dim strComp LastRow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row Sheet2.Select Range("A1").Select For i = 2 To LastRow strComp = Cells(i, 3) If InStr(1,strComp,"Fuel Consumed")= 1 Then erow = Sheet4.Cells(Rows.Count...
  18. S

    Worksheet Loop Macro Using InStr, maybe

    Greetings, I would like to build a simple macro to delete charts in the activeworkbook. I have the following written below: Dim x As Worksheet For Each x In ActiveWorkbook.Worksheets If InStr(1, ActiveWorkbook.Worksheet(x).Name, "Chart", 1) Then...
  19. S

    vlookup? instr? if?

    Hi again everyone, Q: what's the most efficient way to search for partial matches and populate results? I'm fairly beginner at vba but learning quickly. I have two very disorganized workbooks. Wb2 is where I will make all my edits. each workbook when exported has varying lines of code...
  20. S

    INSTR or IF Function - Picking out Specific text.strings in a Cell

    So I've run into a problem that I believe there is a solution for, however, I am not keen on how to implement the function. In the chart below you'll notice that all of the FALSE returns highlighted are actually TRUE. The code is as follows: Range("AC2").Formula =...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back