Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Reading from a text file

Hi,

I am using logic to read from a text file into an array

Logic: where input#1 is my text file
For y = 0 To 360
For z = 1 To 13
Input #1, MyRates(x, y)
Next z
Next y

Question = is it possible to specify a place to start saving the data into
MyRates(x,y), so could I start recording into the array at line 1000 of the
text file, if I choose? How is this done?

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Reading from a text file

Dim somevalue As Integer
Dim ThrowAway As Variant
Dim Z As Long ' loop counter

somevalue = InputBox("What line of data to start with?", "Skip Data", 0)
If somevalue 0 Then
For Z = 1 To somevalue
Input #1, ThrowAway
Next
End If

Hope this gives you some assistance.

"Jeff" wrote:

Hi,

I am using logic to read from a text file into an array

Logic: where input#1 is my text file
For y = 0 To 360
For z = 1 To 13
Input #1, MyRates(x, y)
Next z
Next y

Question = is it possible to specify a place to start saving the data into
MyRates(x,y), so could I start recording into the array at line 1000 of the
text file, if I choose? How is this done?

Thanks for your help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text File creates incorrect Date format Rob Excel Discussion (Misc queries) 2 June 23rd 06 07:53 AM
saving an excel file as text without text in quotes John Excel Discussion (Misc queries) 2 December 6th 05 06:20 PM
Exporting excel to text file Exceluser Excel Discussion (Misc queries) 1 July 1st 05 03:04 AM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"