I am attempting to import an excel spreadsheet into access 2013. The issue that I have is that the column that I need to import varies, meaning it is never the same, whether it be A, B, C, D etc. What I was thinking was, let's set the search text then scan the Excel file, locate the text in the header row, then scan that row to locate the last row. Lastly, use that syntax to import that column to the last row into the database.
Meaning -> let's say that the data exists in column B and the last row is 1123 then I would want to import like such:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbltempDass", MypathDass, True, "B1: B1123"
And of course the range (the last data range) would be variables....Just do not know how to code it in Access VBA