1. 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...
  2. S

    Why this is not Working?

    Dim MyRegExp As RegExp Set MyRegExp = New RegExp With MyRegExp .Pattern = "(?<=Your message wasn't delivered to )(.*)(?= because)"...
  3. 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)"...
  4. 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...
  5. 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...
  6. 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 =...
  7. 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...
  8. 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")...
  9. 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!
  10. 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...
  11. 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...
  12. 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...
  13. 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.
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. J

    Writing a Regex Macro that - stores matches , compares matches , and merges exact and similar values

    (?<word> \w{4,}) This is a php code that does exactly what I want my macro to do. String together characters a-z and 0-9 (not case sensitive) and match words when they are equal to or greater than 4 characters. I am not sure how to get this code into VBA's language. I need it to loop through a...
  19. D

    Extracting data from cell between text or just with text

    I am needing to pull numbers from the middle of a cell. The problem is that the data is entered by many different people and none of them do it the same way. One cell could have “W/.5LWOP/2.75LS” another cell “N 2.5 LS 1.75 LC” another “N 5LS” yet another “N 4@99 1.5LC 2LS 2LU”. Some use spaces...
  20. R

    Use regex to compare cells

    I need to carry out 3 checks between 2 cells Check 1 - Inconsistent capitalization In another tool we use ^[A-Z] (In the filter source field) and ^[a-z] (In the target field) Check 2 - Inconsistent punctuation In aother tools we use \.$ (In the filter Source field) and [^.]$ (In the Target...

Watch MrExcel Video

This Week's Hot Topics

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