Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to import data

Is it possible to write a macro to convert data? I currently use the
text import wizard but since the file I am importing is not delimited
so I choose fixed width and adjust the columns according to the
heading. The problem is some fields in the data are actually longer
than the heading for that column and thus the contents get spread over
two to three columns. Any help in writting a macro for this, if
possible, would be appreciated.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Macro to import data

Gerald,

Is the data separated by spaces, tabs, etc?
How is the data separated?

Text-to-Columns allows you to choose one or more of these, and others.
Including one of your own choosing...

The trick is knowing what separates one data byte from the next...

Reply back...

--
steveB

Remove "AYN" from email to respond
"Gerald" wrote in message
oups.com...
Is it possible to write a macro to convert data? I currently use the
text import wizard but since the file I am importing is not delimited
so I choose fixed width and adjust the columns according to the
heading. The problem is some fields in the data are actually longer
than the heading for that column and thus the contents get spread over
two to three columns. Any help in writting a macro for this, if
possible, would be appreciated.

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to import data

Steve:

I'm not sure what separates the fields but I have tried choosing
delimited and different combinations of each tab and space. Space
seems to be closer but it seems to be best if I just do fixed width
because only one field doesn't fall into the width of the heading.
Thanks for your help!

Gerald

STEVE BELL wrote:
Gerald,

Is the data separated by spaces, tabs, etc?
How is the data separated?

Text-to-Columns allows you to choose one or more of these, and others.
Including one of your own choosing...

The trick is knowing what separates one data byte from the next...

Reply back...

--
steveB

Remove "AYN" from email to respond
"Gerald" wrote in message
oups.com...
Is it possible to write a macro to convert data? I currently use the
text import wizard but since the file I am importing is not delimited
so I choose fixed width and adjust the columns according to the
heading. The problem is some fields in the data are actually longer
than the heading for that column and thus the contents get spread over
two to three columns. Any help in writting a macro for this, if
possible, would be appreciated.

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
Import data and macro Jambruins Excel Discussion (Misc queries) 5 October 24th 07 02:37 PM
Import Data with Macro or VBA sahafi Setting up and Configuration of Excel 0 September 1st 06 06:34 PM
Run a macro after data Import Fred[_24_] Excel Programming 1 July 29th 05 09:30 AM
import data with macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:40 PM
import data using macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:32 PM


All times are GMT +1. The time now is 10:47 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"