Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2020, 11:30 AM
Shabbyexcel Shabbyexcel is offline Concatenate and Do While Loop VBA Windows 10 Concatenate and Do While Loop VBA Office 2016
Novice
Concatenate and Do While Loop VBA
 
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
  #2  
Old 07-31-2020, 10:30 PM
Guessed's Avatar
Guessed Guessed is online now Concatenate and Do While Loop VBA Windows 10 Concatenate and Do While Loop VBA Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,708
Guessed is a glorious beacon of lightGuessed is a glorious beacon of lightGuessed is a glorious beacon of lightGuessed is a glorious beacon of lightGuessed is a glorious beacon of light
Default

What you described and what the code shows are very different.

You need to post example workbooks if you want help on this.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
vba code

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate - function help ganesang Excel 29 12-27-2018 05:31 AM
Concatenate and Do While Loop VBA Concatenate Macro VBA rsrasc Excel Programming 4 09-21-2018 12:42 PM
Concatenate and Do While Loop VBA Concatenate b16 Excel 1 01-09-2017 04:51 PM
Concatenate and Do While Loop VBA Concatenate with @ symbol anickles Excel 2 02-06-2015 09:39 AM
If, move and concatenate in VBA devcon Excel Programming 0 07-04-2011 12:44 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 06:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft