Selectively Importing Text

  • Hello,

    I have a text file with 10 rows of data, all single column so no delimiter needs to be set. In the Excel sheet, I would like to selectively import the rows like this: A1 through A5 in the Excel file gets the data from rows 1-5 from the text file; C1-C3 gets the data from rows 6-9 from the text file; D4 gets row 10.

    How would I code in VBA to perform the above tasks?

    This is what I currently have:

    The code was from a recorded macro. However, all 10 rows are copied into the Excel cells in the same column when I run the code.

    Any help is greatly appreciated.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!