Using VBA I import a csv file into excel from Yahoo Finance containing 7 comma separated values per row. I would like to only import the first and 5th comma separated value
You can supply an array as the FieldInfo parameter to TextToColumns
TextToColumns
This will hide columns 2,3,4,6,7
.TextToColumns FieldInfo := Array(Array(1, 1), Array(2, 9), Array(3, 9), Array(4, 9), Array(5, 1), Array(6, 9), Array(7, 9))
1 = xlGeneralFormat 9 = xlSkipColumn
xlGeneralFormat
xlSkipColumn