Hello! Can someone help me modify the Code Below i just wanted the same code but one feature is added. The feature is arranging the output from the Provided VBA Code into One Column.
I just wanted to add a feature that arrange the data resulted from the below code into one column.
Thank you
This is a link to a thread already has been initiated and responded by User Mumps
I just wanted to add a feature that arrange the data resulted from the below code into one column.
Thank you
VBA Code:
Sub CopyRange()
Dim flder As FileDialog, FileName As String, FileChosen As Integer, srcWB As Workbook, desWS As Worksheet
Dim copyRng As Range, desCol As String, i As Long
Set desWS = ThisWorkbook.Sheets("Sheet1")
Set flder = Application.FileDialog(msoFileDialogFilePicker)
flder.Title = "Please Select a Excel Macro File"
FileChosen = flder.Show
FileName = flder.SelectedItems(1)
Set srcWB = Workbooks.Open(FileName)
Set copyRng = Application.InputBox(Prompt:="Select a range to copy.", Title:="Range Selection", Type:=8)
desCol = InputBox("Enter the column letter where you want to paste.")
If desCol = "" Then Exit Sub
For i = 1 To copyRng.Columns.Count
With desWS
copyRng.Cells(1, i).Resize(copyRng.Columns(i).Cells.Count).Copy
.Cells(.Rows.Count, desCol).End(xlUp).Offset(1).PasteSpecial Transpose:=True
End With
Next i
ActiveWorkbook.Close False
End Sub
This is a link to a thread already has been initiated and responded by User Mumps