1. S

    Replace/Delete a specific pattern within a string using VBA

    Hello, I'm looking for help in locating and replacing/deleting the following pattern within a string in a cell: "" where x represents a numerical character i just learned how to use regExp...but can't figure out for the life of me how to tell it to look for the...
  2. airforceone

    RegEx Row Column Listing Error

    coming from this thread String Parsing I was able to convert @Peter_SSs function code to an ordinary procedure. (thanks again @Peter_SSs ) Sub PetListII() Dim RX As Object, M As Object, RXCtr As Integer Dim K As Integer, ConfisKated As String, FullName As Variant, MaxNumero() As...
  3. O

    insert Regex trick at any step (mid?) Advanced Editor

    Trying to use run the Regex trick (that members Grah and Bo_Ry skillfully adapted for this case), I run into a problem which might have to with my worksheet not being a table. The error text is: Expression.Error: The field 'Comment' of the record wasn't found. Details: Name=Sheet1 Data=...
  4. R

    Find text from repeating sections of text file

    Hi, I want to make a macro to search for repeating blocks of text in a text file. I know how to load the text file to memory but I don't know how to find the repeated text. I've seen examples of searching for text using regular expressions which seems like it might be the way to go, but I...
  5. S

    Why this is not Working?

    Dim MyRegExp As RegExp Set MyRegExp = New RegExp With MyRegExp .Pattern = "(?<=Your message wasn't delivered to )(.*)(?= because)"...
  6. S

    How to make this regex work in Excel?

    Dim MyRegExp As RegExp Set MyRegExp = New RegExp With MyRegExp .Pattern = "(?<=Your message wasn't delivered to )(.*)(?= because)"...
  7. S

    How can I paste the found regex to another column? Getting Invalid procedure call or argument error

    I have been stuck googling for a while now. What I am trying to do is: 1. First check if "mystring" is in column S (s_col) 2. If so, search column P (p_col) for a year that has white space in front and at the end 3. Paste that year into column k (k_col) However I keep getting an error that...
  8. B

    VBA Regex Not Recognizing Pattern

    Hi, I'm working on a program that I want to recognize if a cell contains any number in it by leveraging a RegEx. Currently it isn't working and only returns text when the cell has numbers and text. In the cell I have "55112 5 mile radius" & the cell format is listed as general. Would love any...
  9. D

    Use RegEx to creat in cell fuctions that find substrings and modify them in the string.

    Hi, So I have a list if alphanumeric IDs that I'd like to modify using RegEx to create an in-cell function. I've already enabled Microsoft VBScript Regular Expression 5.5, and I'm using the below code: Function simpleCellRegex(Myrange As Range) As String Set regEx =...
  10. T

    PDF to excel theory

    I've been assign a task where I need to map data from a PDF converted excel file to another exported excel file with pre-determined headers. The goal is to standardized the converted PDF so that the data can be extracted to the exported excel file in vba. One big issue I foresee is that the...
  11. Nelson78

    Regex: hidden "" after a substitution

    Hello everybody. I've a cell assuming different values. For example: 105,32 euro Now, with regex I've removed the non numeric value in order to have 105,32 My code: Dim replacement As Object, trunc As String Set replacement = CreateObject("vbscript.regexp")...
  12. E

    Is it possible to use RegEx in Search and Replace?

    Hello I want to use back references and regex with Search and Replace, is it possible? Thanks!
  13. P

    Highlighting temperatures on cell change

    When the contents of a cell changes, some strings are highlighted. This part I got working already. Now I added a regex to highlight strings that contain a temperature as well (i.e. 13° or 10°-25°) This part however does not work (no error but just no output) This is what I have so far. This...
  14. Caleeco

    Regular Expression TidyUp

    Hello, I have just waded into the world of Regular Expressions. I have created a Function (with some googling) that will check if a pattern exists at the start of a string. The function works as anticipated but Im not sure if this pattern is as clean as it could be? The Pattern is...
  15. A

    search criteria where contains other than specified condition using Regex

    I have a variable with a string...and I want to know if it contains any value other than single quote, comma and a space ("', ") I'm using vba in excel. for example, i have a variable This should return > 0: strA = "'test', 'player'" I want to check to see if strA has any characters other...
  16. Nayasoch

    How to extract video id from url

    Hello EVeryone, I was wondering if there is anyway or Formula to extract Video id from youtube url . For example below is url and video id is Hc7BjYmn9z0 Is there any formula that I can use? Thanks in advance.
  17. I

    Selecting a column instead of a cell in a for loop regex search

    So I am doing a regex search, and if I get a match in the cell that I'm searching for I want to move that WHOLE COLUMN to a different position. My code below works in moving it and inserting it where I want it to go but it only moves the cell and not the whole column.. I've highlighter the line...
  18. M

    extract 10 digit number from cell

    In my excel file I have column AK. Each cell is filled with strings. These strings contain numeric and non numeric information. An example of a string is "house 7410145689 October 2018". The stings always contain different information. Sometimes they contain a 10 digit number and sometimes they...
  19. Ombir

    Extract Words using Regex

    Hi, I've a string like "abc.txt def.txt lmn.png jkl.jpeg pvr.txt". THis pattern "\w*(?=\.txt)" only extract file names of text files i.e abc,def,pvr. Now I want the opposite of this. I want to extract file names that are not text i.e lmn and jkl Please suggest the pattern to match this. If...
  20. Roderick_E

    Regex-like parsing

    Hi old friends, been a while since I've been on here; they got me learning python at work. Anyhow, I'm trying to create a VBA with regex-like abilities. I want to look at a string and parse all <*> (ie, <someword>) and replace it with the word as a variable. Example: Hello <username>, We...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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