Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dany04
 
Posts: n/a
Default Importing text file to excel

I'm trying to import a text file. I want the excel file to have 1/3 as many
rows as the text file; each row will have 3 cells with numerical data: case
number, variable1, variable2. The text file has only one number on each
line. So the format of the text file is:
case number
variable 1
variable 2
case number
variable1
variable2
case number....
(where CR is a carraige return or line break)
How can I read this in so first three numbers are in row one, next three in
row 2, next three in row 3...
Thanks.
  #2   Report Post  
Ron Coderre
 
Posts: n/a
Default Importing text file to excel

This might work for you:

Import the data into Col A, beginning in Cell A1.
B1: =OFFSET($A$1,ROWS($A$1:A1)*3-3,,,)
C1: =OFFSET($A$2,ROWS($A$1:$A1)*3-3,,,)
D1: =OFFSET($A$3,ROWS($A$1:$A1)*3-3,,,)

Copy those formulas down as far as you need them.

Does that help?

€¢€¢€¢€¢€¢€¢€¢€¢€¢€¢
Regards,
Ron


"dany04" wrote:

I'm trying to import a text file. I want the excel file to have 1/3 as many
rows as the text file; each row will have 3 cells with numerical data: case
number, variable1, variable2. The text file has only one number on each
line. So the format of the text file is:
case number
variable 1
variable 2
case number
variable1
variable2
case number....
(where CR is a carraige return or line break)
How can I read this in so first three numbers are in row one, next three in
row 2, next three in row 3...
Thanks.

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
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Excel 2002 importing file origin is in japanese... Bryan Excel Discussion (Misc queries) 0 March 7th 05 04:59 PM
Importing text file Jillianno Excel Discussion (Misc queries) 1 February 16th 05 06:47 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


All times are GMT +1. The time now is 10:02 PM.

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

About Us

"It's about Microsoft Excel"