LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Manipulate textfile with VBA

Hello

I need help for the following VBA-problem:

I have to insert a Value in each Line of one Textfile (file.txt).
This certain Value depends on a other Value in this Line of the
Textfile.
The depending Value is always at the same position,
The textfile is delimited with ";"

A remark, it is possible, that the Textfile has more than 65thousend
rows.


Example, Textfile: depends on FIN_PERIOD

"Time Dimension";"FIN_PERIOD";"VIEW";"REFERENCE_PERIOD";
"Close Year 2006";"Year 2006";"FSA_MV";"20060630"
"Close Year 2004";"Year 2004";"FSA_MV";"20040331"
"Close Year 2005";"Year 2005";"FSA_MV";"20050930"

Depending Table, Mapping Table, this is a Worksheet in the Excel
File:
FIN_PERIOD ACC
Year 2004 100
Year 2005 500
Year 2006 1000



=== Result: [this should be done with VBA]

Modified Textfile:
"ACC"; "Time Dimension";"FIN_PERIOD";"VIEW";"REFERENCE_PERIOD";
"1000"; "Close Year 2006";"Year 2006";"FSA_MV";"20060630"
"100"; "Close Year 2004";"Year 2004";"FSA_MV";"20040331"
"500"; "Close Year 2005";"Year 2005";"FSA_MV";"20050930"

The Inserted New Attribut is "ACC" an the Value is 1000, 100 & 500


Can anyone help me ?
I tried, but no success.... i had big problems in replacing the lines
in the textfile...
How can you programming an "vlookup" in VBA code between the certain
position in the textfile and the depending table / mapping table ?


Kind regards,
Roman

 
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
Export as Textfile with VBA moondark[_11_] Excel Programming 2 December 14th 05 01:45 PM
Move to end of textfile ben Excel Programming 1 March 15th 05 06:43 PM
How do i save as a textfile in a macro? Alex_DK Excel Programming 3 December 8th 04 12:51 AM
SQL-Query from a textfile? Stift[_30_] Excel Programming 5 June 10th 04 08:12 AM
Textfile-problem Tom Excel Programming 0 August 6th 03 05:01 PM


All times are GMT +1. The time now is 02:41 AM.

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"