View Single Post
 
Old 07-29-2020, 11:30 AM
Shabbyexcel Shabbyexcel is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2020
Posts: 1
Shabbyexcel is on a distinguished road
Post Concatenate and Do While Loop VBA

I have a Workbooks("Serial Number").Sheet1 where Column B contains data such as 0001, 0002 , 0003 , 0004 upto 9999 row wise and other Workbooks("Data").Sheet1 have data where ColA has such values

205-371-
205-372-
205-373-
205-374- till used range

row wise

and i am looking to merge the data like below example on the Workbooks("Data").Sheet1 ColA.

205-371-0001
205-371-0002
205-371-0003
205-371-0004

after that wants to add the loop in the formula section in below code.

HTML Code:
Sub Looping()
Dim xFd As FileDialog
Dim xFdItem As Variant
Dim xFileName As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set xFd = Application.FileDialog(msoFileDialogFolderPicker)
If xFd.Show = -1 Then
 xFdItem = xFd.SelectedItems(1) & Application.PathSeparator
 xFileName = Dir(xFdItem & "*.csv*")
Wants to add here a concatenate formula with Do While Loop for all sheets a folder have. 
End If
Dim wb As Workbook
 For Each wb In Workbooks
 wb.Close SaveChanges:=True
 Next wb
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Reply With Quote