How can I update cells in EXCEL from an external file containing data that I just downloaded into a text file. For example, I want record 1 of my file to update the contents of cell A30, record 2 of the file to update cell B30, etc...
Sub Update()
f = FreeFile
ColNr = 1
Open "c:\data\test.txt" For Input As #1
Do While Not EOF(f)
Line Input #f, t
Cells(30, ColNr) = t
ColNr = ColNr + 1
Loop
Close #f
End Sub
Where "c:\data\test.txt" is the file with your data...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.