Excel

Extract phone numbers using Regex in Excel vba

Extract phone numbers using Regex in Excel vba Extract phone numbers from Excel using Regular expressions in the patterns (***) ***-****. In order to extract phone numbers, where cells are mixed with strings and phone numbers; Regular expression concept play an important role.   Option Explicit Sub ewqre() Dim str As String, n As...

Delete First line of Text file and Import -Excel vba

Delete First line of Text file and Import -Excel vba Select Folder that contains the text files. It reads each text file into an array and then builds a new array (that doesn’t include the first line of each text file) first way (not verified):  Sub SO() Const fileLocation As String = “C:\Users\BloggsJ\Folder\textFile.txt” Dim...

Replace specific line of text file using Excel VBA

Replace specific line of text file using Excel VBA It includes both the first line replacement, and the last 6 characters replacement. Sub GenerateACEQueries() 'Script sourced from 'http://www.excelbanter.com/showthread.php?t=427791 'http://www.ozgrid.com/forum/showthread.php?t=181679 Dim strFileNum As String Dim rCell As Range ‘Declarations for parsing first line in text file (opening date) Dim vSz As Variant, vFilename As Variant...

How To Vlookup Values Across Multiple Worksheets?

How To Vlookup Values Across Multiple Worksheets? Vlookup across multiple worksheets can be found using regular formulas. It is easy to do with array formula using array formulas. Regular Formula: =IFERROR(VLOOKUP($A2,Sheet1!$A$2:$B$5,2,FALSE),IFERROR(VLOOKUP($A2,Sheet2!$A$2:$B$5,2,FALSE),VLOOKUP($A2,Sheet3!$A$2:$B$5,2,FALSE))) Array Formula: =VLOOKUP(A2,INDIRECT(“‘”&INDEX(Sheetlist,MATCH(1,–(COUNTIF(INDIRECT(“‘”&Sheetlist&”‘!$A$2:$B$5″),A2)>0),0))&”‘!$A$2:$B$5”),2,FALSE) In the above formula: A2: is the cell reference which you want to return its relative value; Sheetlist: is the...

Move Files from one folder to another Excel VBA

Move Files from one folder to another Excel VBA Move files from one folder to another folder. If required, you can create a new folder Sub move_data() 'Move test data to folder Dim FSO As Object Dim FromPath As String Dim ToPath As String Dim Fdate As Date Dim FileInFromFolder As Object MkDir "D:\TEST\"...

This is a demo store for testing purposes — no orders shall be fulfilled. Dismiss