regexp

  1. G

    RegEx on a large range

    Hi, I have been experimenting with RegEx. Most of the examples on the net involve looping through the whole range in which you want to make changes with RegEx. On large files it takes ages to do it. Is there a faster way? I.e. maybe applying RexEx to the whole range instead of looping through...
  2. T

    Extracting data seperated by spaces

    i am working with a excel spreadsheet that has been converted from PDF. The conversion rendered merged cells in a column that has percentages separated by 5 spaces (i.e. 100% 50%). Is it possible to use RegEx to extract "50%" and place it in next column ("C")? An un-merged action frees up...
  3. 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...
  4. T

    Date change in Word document

    Hello - I am trying find date occurrences in a Word document from Excel. The format of the date is 'ddmmmyy'. (Example: 17SEP18). I want to be able to replace with the current date. This is what I have so far (probably much simpler than this) Dim regexp As New RegExp Dim prevdate As String...
  5. K

    VBA Code To Parse and Evaluate Various Feet and Inch Notations For Peer Review

    I needed a function to convert feet and inches into a decimal number (eg 5' 10 1/2" => 60.5 (inches)). I found various excel formulas and UDF while googling around but either found them to limiting or error prone. I've cooked up the following RegExp based UDF to evaluate feet & inch strings and...
  6. A

    VBA for making a list to extract Unique Cell References from an entire Workbook - REGEXP

    The following code extracts all references one cell at a time with a function. Somehow it works fine for my project. However, I need almost the same but applied to ALL cells within a whole workbook. So, the code should add a new sheet and make a list with one row per unique reference found...
  7. J

    How to use regexp and arrays to match groups or sets of 3 individual patterns?

    Sorry if this get's duplicated, tried to post, but wasn't logged in and then auto redirect didn't go anywhere, so went back and trying again... Hey all, I'm new to Reg exp and I'm going to try to use it in Outlook... I know this is an Excel forum, but there are so many super smart and helpful...
  8. P

    VBA RegExp CODE 5019

    Hi folks, It's my first time here and I'm needing your help. I'm trying to use a specific regular expression, but when a I try execute, the message shows "Run-time error 5019" The regular expression I'm using is "(Sumário\n[^]+)". I done some tests and the error is "^". How can I done it...
  9. P

    RegExp in VBA

    Hi, I am trying to use RegExp in VBA to find all named ranges in a formula. To find it, I'm basically looking for a string that doesn't end with a ( and that is only made up of a-z, A-Z, 0-9, \, _. I'm a bit confused about atomic groups and look arounds. As far as I understand it...
  10. E

    Extracting unit measures from text strings

    Hi, So I'm scraping data from online stores into an excel sheet and often get cells with the following text: "ACANA ADULT SMALL BREED 2.5KG" I want 2.5 to be taken out of this cell (A1 for example) and moved into the next column (B1), and the unit kg to be moved in the next one yet (C1)...
  11. J

    VBA Search and Replace with wildcard?

    Hi all, I am working on a cleanup macro to take the raw report our HRIS spits out (which is incredibly un-user-friendly) and give back a usable table. One part of it is going through the column of employee schedules and changing the codes it starts with to equivalent numerical values - it...
  12. K

    Formula to remove part of URL

    I have a sheet with several thousands of URLs that look like this: http://www.example.com/2349823948/http://www.example2.com/some-url.html http://www.example.com/2300003948/http://www.example2.com/some-url2.html Is there a good formula/process for creating a column that removes everything...
  13. M

    Macro to lock string in cell

    Hi there, I have an Excel file with several cells containing text. The text contains some codes and I would like to know whether it's possible to lock those codes (by means of some formula or VBA macro, for example). The aim is that any text contained in the cell can be modified except those...
  14. W

    Excel VBA RegEx formula

    Good morning. I am new to Regular Expressions, and I am trying to validate a number like 012345-1234. I have the following: Public Function ValidNumber(ByVal strNumber As String) As Boolean With CreateObject("VBScript.RegExp") .IgnoreCase = True .Global = True...
  15. Jon von der Heyden

    RegExp, find and replace

    Hi All I'm a bit rusty on the ol' regexp and I think I have been trying too hard for too long so I've lost the plot. Any help appreciated... I have a string in cell E11: ||=IF($B$8,< ISIN > & " " & IF(< TYPE >="Bond",IF(ISBBERR(BDP(< ISIN > & " Corp",SECURITY_NAME)), "Mtge","Corp"),IF(< ISIN...
  16. J

    Excel for Google PPC: How to Break Up a Text String Into 2 Cells Based on Character Limits & Spaces

    I'm using Google PPC to promote some live training events. I have a database full of upcoming event titles. I need to build dynamic ads using these title values as well as some other parameters. Google gives you 2 description fields to populate both with a character limit of 35 each. Many of...
  17. R

    Regex Function

    Hi People I have searched a _lot_ for this solution, but I do not know how to do it in VBA. I want to be able to call a function in the following way: MsgBox RegExp("abc123def456", "a(.+?)def(.+?)6", "$1Hello$2") And for that to return: bc123Hello45 I have found many regex functions, but...
  18. S

    Placeholder in function for selected cells

    Hi I am having a basic problem. I am trying to create a udf. Its very basic I just want a udf for converting a cell range well not converting removing non numeric characters and leaving only numbers. I can't figure how to put a placeholder in the udf to stand for whatever cell range selected...
  19. M

    Regular Expressions: Named groups in VBA

    Hi, Is it possible to used named groups in VBAs version of Regular Expressions (Regexp) Example match groups for extracting dates from strings: (?:(\d{2})\.(\d{2})\.(\d{4})\s(\d{2}):(\d{2}):(\d{2}))|(?:(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2}) will return DD.MM.YYYY or YYYY-MM-DD in submatch...

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