Create txt file with data manipulation and reorganization (macro)

V

vertblancrouge

Hi everyone

First, I must say that I am a total newbie at macros.

At my company we are using wire run list in excel format. Using this WRL, we
then print tags on a specialized printer which requires a very define txt
format for us to import data.
The worksheet contains several columns, the following being the ones I need
to use (letters are the actual columns in the file):
wirename(A), cmp1(B), pin1(C), cmp2(E), loc2(F), tag#(I)
The worksheet can be filled with hundreds of line, even thousands
The "tag#" column only list a few different entries

I want to create a macro that will manipulate the information from the
columns listed above and format it in a speficic txt file.


TXT will be in that format:

TMS90
9custum text from somewhere in the worksheet
8tag# value #1
7001
6wirename (first value for tag# value 1)
6cmp1:pin1
6wirename
6cmp2:pin2
7001
6wirename (second value for tag# value 1)
6cmp1:pin1
6wirename
6cmp2:pin2
....
7001
6wirename (last value for tag# value 1)
6cmp1:pin1
6wirename
6cmp2:pin2
8tag# value #2
7001
6wirename (first value for tag# value 2)
6cmp1:pin1
6wirename
6cmp2:pin2
7001
6wirename (second value for tag# value 2)
6cmp1:pin1
6wirename
6cmp2:pin2
....
7001
6wirename (last value for tag# value 2)
6cmp1:pin1
6wirename
6cmp2:pin2
5 (number to mark the end of the txt file

This particular format is typical to the printer we are using to print wire
tags and I do not want to generate it by hand every time...

I don't necessarily expect anyone to give a full code, but some guidance on
how to approach this, various functions to achieve this data manipulation
(loops, concatenations, character addition, etc.)

On the mean time, I am looking at whatever I can find on the Internet to
learn macros quickly so I can eventually build macros on my own.

Thanks for any help you can provide me.
 

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

Top