I'm not very Excel savvy, much less coding savvy but at the moment, I'm tasked with setting up an Excel record sheet of data, with such data pulled from fillable PDFs that are merged into a .csv file.
I want to have a simple command that will pull that data with the following mechanism/command path in Excel: Data > Grab Data from Text > select .csv file > delimited > comma delimited > ... > destination = next blank cell > Finish/Okay.
What I'd like help with is to have the Macro input the next .csv file data into the next empty cell in column A to ultimately create a growing list.
As of right now, I've recorded the Macro and figured if I could change the destination in line 7 from "Destination:=Range( _$A$1) to select the next blank cell instead, I'd be good.
For the CSV file titled "combined.csv", I have a command script someone helped me with that would basically rewrite it with new data each time under the same file name, which won't be a problem for us.
Sub Macro5()
Macro5 Macro
Application.CutCopyMode = False
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\Alvin_2\Desktop\CSV Files\combined.csv", Destination:=Range( _
"$A$1"))
.CommandType = 0
.Name = "combined"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
So far, I have had no luck with finding a function to select the next blank cell in column A.
Would anyone have an idea of the code I should enter in the Destination section to get the Macro to input the new data onto the next empty cell in column A?