#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Importing data

I need to setup a macro or something to import files and convert them. The
file starts out like this example:

ACT:990 POINT FA(PNT_144)
X=8.2207 Y=-0.9689 Z=0.2303
ACT:991 POINT FA(PNT_145)
X=8.2207 Y=-0.9702 Z=1.3993
ACT:992 POINT FA(PNT_146)
X=4.0937 Y=-0.9612 Z=1.3264
ACT:993 POINT FA(PNT_147)
X=4.0940 Y=-0.9608 Z=0.2135
ACT:994 POINT FA(PNT_148)
X=-0.5363 Y=-0.9822 Z=0.1765
ACT:995 POINT FA(PNT_149)
X=-0.5363 Y=-0.9819 Z=1.4171
ACT:996 POINT FA(PNT_150)
X=0.2498 Y=-0.1904 Z=1.4173
ACT:997 POINT FA(PNT_151)
X=0.2498 Y=-0.1898 Z=0.1923
ACT:998 POINT FA(PNT_152)
X=0.6993 Y=-0.2144 Z=0.1923
ACT:999 POINT FA(PNT_153)
X=0.7003 Y=-0.2149 Z=1.3645

I need it to come in looking like this:

8.2207 -0.9689 0.2303
8.2207 -0.9702 1.3993
4.0937 -0.9612 1.3264
4.0940 -0.9608 0.2135
-0.5363 -0.9822 0.1765
-0.5363 -0.9819 1.4171
0.2498 -0.1904 1.4173
0.2498 -0.1898 0.1923
0.6993 -0.2144 0.1923
0.7003 -0.2149 1.3645

I would appreciate any help I can get.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Importing data

You can get this using formulas. Assuming you have this information in Col A
and cell A1 contains

ACT:990 POINT FA(PNT_144) X=8.2207 Y=-0.9689 Z=0.2303

try the below formulas in B1. C1 and D1

B1 =VALUE(MID($A$1,FIND("X=",$A$1)+2,10))
C1 =VALUE(MID($A$1,FIND("Y=",$A$1)+2,10))
D1 =VALUE(MID($A$1,FIND("Z=",$A$1)+2,10))

Copy the formulas down

If this post helps click Yes
---------------
Jacob Skaria


"TimH" wrote:

I need to setup a macro or something to import files and convert them. The
file starts out like this example:

ACT:990 POINT FA(PNT_144)
X=8.2207 Y=-0.9689 Z=0.2303
ACT:991 POINT FA(PNT_145)
X=8.2207 Y=-0.9702 Z=1.3993
ACT:992 POINT FA(PNT_146)
X=4.0937 Y=-0.9612 Z=1.3264
ACT:993 POINT FA(PNT_147)
X=4.0940 Y=-0.9608 Z=0.2135
ACT:994 POINT FA(PNT_148)
X=-0.5363 Y=-0.9822 Z=0.1765
ACT:995 POINT FA(PNT_149)
X=-0.5363 Y=-0.9819 Z=1.4171
ACT:996 POINT FA(PNT_150)
X=0.2498 Y=-0.1904 Z=1.4173
ACT:997 POINT FA(PNT_151)
X=0.2498 Y=-0.1898 Z=0.1923
ACT:998 POINT FA(PNT_152)
X=0.6993 Y=-0.2144 Z=0.1923
ACT:999 POINT FA(PNT_153)
X=0.7003 Y=-0.2149 Z=1.3645

I need it to come in looking like this:

8.2207 -0.9689 0.2303
8.2207 -0.9702 1.3993
4.0937 -0.9612 1.3264
4.0940 -0.9608 0.2135
-0.5363 -0.9822 0.1765
-0.5363 -0.9819 1.4171
0.2498 -0.1904 1.4173
0.2498 -0.1898 0.1923
0.6993 -0.2144 0.1923
0.7003 -0.2149 1.3645

I would appreciate any help I can get.

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
Missing Cloumn data when importing external data Findus Excel Discussion (Misc queries) 0 December 16th 08 11:22 AM
Importing:Data Connection Wizard Doesn't see Source Data - No Impo Exotic Hadron Excel Discussion (Misc queries) 0 October 1st 08 07:35 PM
Removing Data Tables formed from importing data from Access Andrea Jones Excel Discussion (Misc queries) 0 April 10th 08 12:01 PM
Data types when importing Excel data to SQLServer [email protected] Excel Discussion (Misc queries) 1 September 27th 06 12:48 PM
Importing data, then adding data to the new spreadsheet.. a conund AndyL82 Excel Discussion (Misc queries) 1 March 9th 06 10:05 PM


All times are GMT +1. The time now is 08:26 PM.

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"