ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   EXCEL VBA (https://www.excelbanter.com/excel-programming/328199-re-excel-vba.html)

Franz

EXCEL VBA
 
"VINCE" ha scritto nel messaggio


Can you help me programming in VBA ?

I've got a sheet EXCEL with belgian payments (date, date execution,
account, name, address, amount, communication, ...) and I'd like to
transfer it to a .DOC or .TXT file in a special format (fixed format
from Belgian Banks Association). This format is the same for
everybody and have a fixed lenght (first record for the date,date
execution, ...) then one or two records per payment, the laste record
is a check with sum of amounts, number of payments, ... Each record
has a lenght of 128 characters and every information as a maximal
fixed lenght and a special position fixed within the record. Am I
clear ?

I thought to transfer to WORD with bookmarks fixed on a special
position on the line but I don't find how to do that and I'm
wondering if there is not another solution.


You can save your file in CSV format.
This should work...

Hoping to be helpful

Regards

--
Franz

----------------------------------------------------------------------------------------
To reply translate from italian InVento (no capital letters)
----------------------------------------------------------------------------------------



Vince

EXCEL VBA
 
I've tried but it doesn't work. To be clear I give an example :

Cell A1 = Account number (12 positions), cell A2 = Name (max 26 positions)

I'd like to transfer it to a .doc or .txt as :

line 1 position 4 to 15, account number and line 1 positions 16 to 41, Name
and the next data will come on position 42, whatever is the lenght of the
Name encoded in cell A2.

Any idea ?

Thanks in advance.

Vince

"Franz" wrote:

"VINCE" ha scritto nel messaggio


Can you help me programming in VBA ?

I've got a sheet EXCEL with belgian payments (date, date execution,
account, name, address, amount, communication, ...) and I'd like to
transfer it to a .DOC or .TXT file in a special format (fixed format
from Belgian Banks Association). This format is the same for
everybody and have a fixed lenght (first record for the date,date
execution, ...) then one or two records per payment, the laste record
is a check with sum of amounts, number of payments, ... Each record
has a lenght of 128 characters and every information as a maximal
fixed lenght and a special position fixed within the record. Am I
clear ?

I thought to transfer to WORD with bookmarks fixed on a special
position on the line but I don't find how to do that and I'm
wondering if there is not another solution.


You can save your file in CSV format.
This should work...

Hoping to be helpful

Regards

--
Franz

----------------------------------------------------------------------------------------
To reply translate from italian InVento (no capital letters)
----------------------------------------------------------------------------------------




Franz

EXCEL VBA
 
"VINCE" ha scritto nel messaggio


I've tried but it doesn't work. To be clear I give an example :

Cell A1 = Account number (12 positions), cell A2 = Name (max 26
positions)

I'd like to transfer it to a .doc or .txt as :

line 1 position 4 to 15, account number and line 1 positions 16 to
41, Name and the next data will come on position 42, whatever is the
lenght of the Name encoded in cell A2.


Maybe you can try to use Data Validation to set the max lenght of each filed
(cell) and then Save As and choose .txt.

I think this should work... :-)

Hoping to be helpful...

Regards

--
Franz

----------------------------------------------------------------------------------------
per rispondermi traduci InVento in inglese (no maiuscole)
----------------------------------------------------------------------------------------




All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com