Importing data

T

TimH

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.
 
J

Jacob Skaria

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Modifying Data 2

Top