instr

  1. X

    VBA Function which is somewhat a Reverse of CHOOSE

    We all know how CHOOSE Works eg. If I had month number and I wanted to convert them into Month name then I'd be using Choose ie. MonName=CHOOSE(Monno,"Jan", "Feb", "Mar", "Apr", "May" "Jun", "Jul", "Aug", "Sep", "Oct" "Nov" "Dec") But what my query is that if we were given month names and were...
  2. A

    Excel vba loop through list until

    Hello, I am trying to work on a way to automatically fill in a schedule for where someone should be. What I have so far is in my 1st sheet I have a table of cells I want to fill, across the columns i have dates, and down the rows I have the locations. In my 2nd sheet I have the dates of when...
  3. J

    InStr, vbTextCompare, Last.Collumn

    hi all, i am busy with an formula, for a quite big project. i use this code: V_End_Of_Table = ActiveSheet.UsedRange.Rows.Count Dim cell As Range For Each cell In Range("CA2:CA" & V_End_Of_Table) If InStr(1, cell.Value, "fcnswanlrtm", vbTextCompare) > 0 Then Range("CX" &...
  4. L

    Get rid of part of a string when the part to delete is at an unknown position

    I'm having a blank moment. Once a string variable has been set, I basically need to check it for certain substrings within it, and get rid of them, and join the string back up. It will mainly be getting rid of any occurrences where there is a double, concurrent occurrence of "%2B" in the...
  5. S

    Delete row if includes any value in array

    This is a bit of a follow-up to my question here, where I inquired on using an array for in-string values to not delete a row. Thanks again to Peter, this saved me a ton of time. I'm now trying to work out the opposite, more or less: to delete a row if any value in an array is present. I'm sure...
  6. M

    Help me improve my first Instr function

    So the problem im solving is as follows: Im comparing a list of company names which are missing legal form and city(but sometimes they have a city or legal form or both), and a list of properly formated names, and then returning a properly formated name. Ive adapted wellsr substr code to make...
  7. H

    Pull out names from a string, into multiple columns?

    Trying to run a quick script to pull a few names out of a string and place them in the column next to the string location. Cant seem to get this going. Any tips would be greatly appreciated. Sub james() Dim celltxt As String celltxt = ActiveSheet.Range("d4").Text If InStr(1, celltxt, "Sue")...
  8. M

    String Functions: Deleting Last Name and Trailing Text After a Space

    Hello:This is my first post on this site. So forgive me if this has already been explained and I would ask for help to locate that post. Basically (and to try and be less verbose as I usually am), I am working on a project for my employer where I am designing an "interview" process that will...
  9. M

    InStrRev

    Hi guys, I am working on excel 2010 and have a file path from which I need to separate the file name. Since the files could always be in different places, I wanted to search for the last "\" with InStrRev. Then I wanted to subtract this value from the length (Len) of the string and use this...
  10. M

    InStr only finds first occurrence of a match... how to i find them all?

    Hello, I am using inkEdit to change the color of all strings in my inkEdit textbox " SAVED " to be green. Only problem is that it will only make the first occurrence green and not any of the others. How do i fix this? thanks! Private Sub inkChange() Dim iStart iStart =...
  11. A

    Question about using "Instr" in Access VBA

    I am pretty new to VBA and managed to write some code to export some customer information to word similar to a mailmerge function. In my Access database, The customer name shows as: LastName, FirstName Middle Initial Smith, John A I use the Instr function to use the comma position and export...
  12. P

    Macro: find a set of words in a string

    Hi, I am writing a macro which can find if a cell in Column B contains the words in column A. If it does, it writes result in column C. eg. in the following table, B3 has word 'not' so 'Found' is displayed in C3. Goal: <tbody> <tbody> A B C 1 Look for Look into Result 2 not Sunday is...
  13. H

    Deleting Certain Rows Using InStr

    Hi there, I'm trying to delete specific rows in a range that do not contain the value input by a user, almost like a filter: User clicks command button and enters value -> Range ("C2:C25") is queried for the value -> Any cells that do not contain the value are deleted (as a whole row) The...
  14. D

    Array Indexing Troubles

    I'm trying to search 2 different columns containing strings for keywords, which I have put in an array. I'm also searching a couple of other columns for some specific numbers. If conditions are met, I want to flag a cell with an "x", if conditions are not met, I want to mark it with an "-"...
  15. E

    VBA search for spaces in a string - conversion from european to american decimal notation

    Hi Folks, I have a badly structured CSV file that I have to scan as input to spreadsheet. Is there a way in VBA to scan for a string of spaces using a string function like Instr. Also in VBA I am looking for a function to convert numbers that are formatted using the european system with a comma...
  16. S

    need help with instr() to find a section of comment text to replace

    i need to find a way of editing a section of comment text. i have most of the code figured out already. my macro button takes the info contained in the first few columns of one row in the active sheet and compiles this info into a comment for a found cell in sheet1. sometimes the info in the...
  17. P

    Searching in text without truncation

    I am looking for a way to search for words in text without truncating the search (which I automatically do if using instr). The script needs to be reasonably fast since I have about 3*50000 cells to search in and about 500 search terms. So far I have been using If InStr(UCase(title(j, 1))...
  18. Prevost

    Return True or false value if string is found in range

    Hi There, I am wondering if there is a function in excel that would return true or false when searching for a string segment. I am currently using the below code to evaluate my search, which seems to be working, but I was just wondering if anyone knew of anything else out there? Thanks! If...
  19. Whylucky

    VBA Find Function

    So I am trying to code a macro that will search through a selected range of cells for key letters, for instance this cell may contain any combination of B, C, Te, Tc, RH, or LH. I would preferably like to search with capitalization being a factor but it is not a deal breaker. Below is a sample...
  20. H

    Using a String Value as a Condition to Alter the Value of Another Cell

    Hello All, I've spent my entire morning trying to find a way to do the following (sorry about the terrible syntax here, I'm new at this) Sub() For all cells in a column If the cell contains the string "hello world" Then Move one cell to the right and enter the letter "n" End...

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