Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Importing Text File into Excel

Hi All,

On a monthly basis I import a text file into excel and "massage" the data to
fit into the columns. However, this is a long and tedious process. I am
wondering if some one could provide a vb script that will do this for me.

Any help would be greatly appreciated.

Regards,

Naraine


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Importing Text File into Excel

hi,
have you tried datatext to columns? Its a built in wizard.

Regards
FSt1

"Naraine Ramkirath" wrote:

Hi All,

On a monthly basis I import a text file into excel and "massage" the data to
fit into the columns. However, this is a long and tedious process. I am
wondering if some one could provide a vb script that will do this for me.

Any help would be greatly appreciated.

Regards,

Naraine



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Importing Text File into Excel

yes, this is what I'm actually using. I'm still faced with the huge problem
of massaging the data to get the desired result.


"FSt1" wrote in message
...
hi,
have you tried datatext to columns? Its a built in wizard.

Regards
FSt1

"Naraine Ramkirath" wrote:

Hi All,

On a monthly basis I import a text file into excel and "massage" the

data to
fit into the columns. However, this is a long and tedious process. I am
wondering if some one could provide a vb script that will do this for

me.

Any help would be greatly appreciated.

Regards,

Naraine





  #4   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 145
Default Importing Text File into Excel

"Massaging" data means what exactly ?
Automating a process begins with understandidng what it is...

Tim


"Naraine Ramkirath" wrote in message
...
yes, this is what I'm actually using. I'm still faced with the huge
problem
of massaging the data to get the desired result.


"FSt1" wrote in message
...
hi,
have you tried datatext to columns? Its a built in wizard.

Regards
FSt1

"Naraine Ramkirath" wrote:

Hi All,

On a monthly basis I import a text file into excel and "massage" the

data to
fit into the columns. However, this is a long and tedious process. I am
wondering if some one could provide a vb script that will do this for

me.

Any help would be greatly appreciated.

Regards,

Naraine







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Importing Text File into Excel

On a monthly basis I import a text file into excel and "massage" the
data to fit into the columns. However, this is a long and tedious
process. I am wondering if some one could provide a vb script that
will do this for me.


If I understand you correctly, then this is something I do frequently as
well. One solution would be to open a blank workbook, turn on the macro
recorder (have the macro recorded in the current blank workbook) and go
through what you do when you import the text file. Then edit the macro if
need be, if it needs generalising.

The code that opens the text file will look something like this:

Workbooks.OpenText Filename:="<Your txt filename", dataType:=xlDelimited,
tab:=True ...

Short of you explaining what exactly you do with the data when you massage
it, I can't help you any further.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Importing Text File into Excel

Here is a sample of data I'm working with. I need to split each category
into a separate column. Note:

the Vendor Number and Name is in the row above the Vendor Total. I'm trying
to split vendor total into the respective columns: Document;Transaction
type;Transaction Date;Amount;Past due;Current;31-60 Days;61-90 Days;91+
Days.

I also have to deal with blank rows & report titles that repeats at the
beginning of each page.

Any help would be greatly appreciated.


Transaction Transaction
Document Type Date Amount Past Due Current
31-60 Days 61- 90 Days 91+ Days
--------------------------------------------------------------------------
----------------------------------------------------------

Vendor : ALLIED ALLIED FULFILLMENT SERVICES


Vendor Total : -1000.00 -1000.00 0.00
0.00 0.00 0.00
--------------------------------------------------------------------------
----------------------------------------------------------

Vendor : ALTSHULER LOU ALTSHULER & ASSOC.


Vendor Total : 14720.68 0.00 0.00
14720.68 0.00 0.00
--------------------------------------------------------------------------
----------------------------------------------------------

Vendor : BAUMAN RON BAUMAN & ASSOCIATES


Vendor Total : 0.00 0.00 0.00
0.00 0.00 0.00
--------------------------------------------------------------------------
----------------------------------------------------------

Vendor : BELK BELK INC.


Vendor Total : 1737.80 1737.80 0.00
0.00 0.00 0.00
--------------------------------------------------------------------------
----------------------------------------------------------

Vendor : BELLVILLE BELLVILLE RODAIR INTERNATIONAL


Vendor Total : 117966.37 15114.55 55494.99
47356.83 0.00 0.00
--------------------------------------------------------------------------
----------------------------------------------------------

Vendor : BL ROGERS B.L. ROGERS ASSOCIATES, INC.


Vendor Total : 206.18 32.36 0.00
173.82 0.00 0.00
--------------------------------------------------------------------------
----------------------------------------------------------

"IanKR" wrote in message
...
On a monthly basis I import a text file into excel and "massage" the
data to fit into the columns. However, this is a long and tedious
process. I am wondering if some one could provide a vb script that
will do this for me.


If I understand you correctly, then this is something I do frequently as
well. One solution would be to open a blank workbook, turn on the macro
recorder (have the macro recorded in the current blank workbook) and go
through what you do when you import the text file. Then edit the macro if
need be, if it needs generalising.

The code that opens the text file will look something like this:

Workbooks.OpenText Filename:="<Your txt filename", dataType:=xlDelimited,
tab:=True ...

Short of you explaining what exactly you do with the data when you massage
it, I can't help you any further.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Importing Text File into Excel

Here is a sample of data I'm working with. I need to split each
category into a separate column. Note:

the Vendor Number and Name is in the row above the Vendor Total. I'm
trying to split vendor total into the respective columns:
Document;Transaction type;Transaction Date;Amount;Past
due;Current;31-60 Days;61-90 Days;91+ Days.

I also have to deal with blank rows & report titles that repeats at
the beginning of each page.

Any help would be greatly appreciated.


[snip]

Please see the e-mail I just sent you.

Ian


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Importing Text File into Excel

joel,

i removed the spaces as you suggested. I still get that error. The total
number of records is approx. 600.

I don't think this data set is large. maybe the code is creating this
complexity. can this code be written in a more efficient way?

Naraine


"Naraine Ramkirath" wrote in message
...
Hi All,

On a monthly basis I import a text file into excel and "massage" the data

to
fit into the columns. However, this is a long and tedious process. I am
wondering if some one could provide a vb script that will do this for me.

Any help would be greatly appreciated.

Regards,

Naraine




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
importing text file to excel sherry Excel Discussion (Misc queries) 1 February 20th 08 08:17 PM
Importing on certain rows from a text file into excel [email protected] Excel Programming 0 June 20th 06 11:37 AM
Importing Text File into Excel Martin Excel Discussion (Misc queries) 1 April 2nd 06 02:48 PM
importing text file in excel UT Excel Discussion (Misc queries) 0 March 16th 06 10:20 PM
Importing text file to excel dany04 Excel Discussion (Misc queries) 1 November 9th 05 01:13 AM


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