like function

  1. J

    Like Function without Case Sensitivity for String Searches

    Hi All, I have a file with a LOT of data, particularly names, so I wrote a quick search macro that opens and closes the columns based on the entry from the user so they don't have to scroll through thousands of columns. It works wonderfully, and is actually pretty quick for the amount of...
  2. E

    Excel and MS Query issue

    Hello, I'm utilizing MS query in excel and can get the user to input a value in a cell and then the report refreshes for this specific criteria, say if they select North or South. However I want a report that uses this cell but brings back all data that meets that criteria, so in the example...
  3. D

    Like Function Not Working for All Cells

    Hello, I am using the Like function, but it isn't working on all of the cells. column B has company names. I am trying to get rid of names that have the word sample in them. my code: 'getting rid of sample plans For Each cell In Range("B2:B" & lastrow) If cell Like "*Sample*" Then...
  4. F

    Case with like

    hi, I have macro where I'm opening workbooks and for diffrent sheets I want to run code. ... Set wb = Workbooks.Open(strPath2 & strFile2) Dim myArray() As String Dim myCount, NumShts As Integer NumShts = wb.Worksheets.Count ReDim myArray(1 To NumShts) For myCount = 1...
  5. C

    VBA: Regular Expressions

    I need help creating a function to compare strings; probably using regular expressions since it is a bit tricky. We have six strings: String 1: "V06+K73+U55+M67" String 2: "!M43" String 3: "!U67" String 4: "V06" String 5: "" String 6: "" In this case, "!" means 'not' so this statement would...
  6. C

    Excel VBA: Finding a String in a String

    Suppose I have two strings: U98 & K11+P46+M67+U98 ..All I need to know is how to return True if the first string is in the second or False if it is not. I have been trying to use this: str1Mask = curStrCell.Value Like strCell.Value If str1Mask = True 'Do whatever End If Where curStrCell is...
  7. F

    Like Function in VBA/Macros

    Hello, i am tring to run a "For Each" Loop in excel with the condition that if cells in selecton trends ("Like") with another range. Range("A:A").Select For Each MyCell In Selection If Mycell.value Like Range("B:B") Now I am not sure if I can run Like function against a range ... it works if...
  8. D

    Using characters in LIKE for string

    Hey guys, i know that this works: bool = "*abc*" like "xabcx" 'true dim a as string, b as string a = "abc" b = xxxacbxxx" if True = a like b then '... end if Is it possible to use characters like * ? # in the second code: if True = *a* like b then 'I know, that does not work I hope...
  9. M

    LIKE function in VBA not working

    Hi All, I'm facing a problem in executing the following code snippet : sub strtest() X = [FACT*]*[!FACT*DM] tbl_nm = "FACT_TSS_PRDCT_ATTRBTS_ABC" If tbl_nm Like X Then MsgBox "TRUE" End Sub This means that if tbl_nm (Table Name) starts with FACT but does not end with DM, the MSGBOX should...

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 MrExcel.com.
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 "mrexcel.com".
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
Back
Top