Hi, I'm trying to figure out how to make a macro that will rearrange data in a file so that the lines associated with a individual's account data are lined up on a single line, per account. I've never made a macro from scratch before, so I don't even know where to begin. All I know how to do is Run a macro that someone else already made and saved in a little file for me. But alas, each macro is specific to each type of file I have, so I can't just edit it to replace markers for the macro to look for.
Here's an example of the data in the file:
01 line one of account A
02 line two of account A
03 line three of account A
01 line one of account B
02 line two of account B
03 line three of account B
etc.. etc...
I need to put all the data for each account on a single line, instead of it being on three lines, so it looks like this:
01 line one of account A 02 line two of account A 03 line three of account A
01 line one of account B 02 line two of account B 03 line three of account B
Basically, move each cascading line for a single account to the end of the line before it, and then starting over again for each new account all the way down a sheet. Each new account starts with 01, and the following lines that continue with 02, 03, 04, etc... all go with the 01 line before it. When a new 01 line appears, that means its for a new account, and the 02, 03, 04... under that one goes with it.
The data is stuff like first names, last names, dates of birth, dollar amounts, etc.... so it would be data for one person on each line. The formatting and spacing is consistent on each line, so once I can get it into an Excel sheet, I can use a Fixed-Width delimiter straight down the sheet to separate all the data into specific formatted columns.
But I don't know how to get a big sheet of accounts with several cascading lines to merge into a single line for each account.
I can visualize all this in my head, but I don't know how to to make a macro to do it in UltraEdit.
Help!
Thanks!
Here's an example of the data in the file:
01 line one of account A
02 line two of account A
03 line three of account A
01 line one of account B
02 line two of account B
03 line three of account B
etc.. etc...
I need to put all the data for each account on a single line, instead of it being on three lines, so it looks like this:
01 line one of account A 02 line two of account A 03 line three of account A
01 line one of account B 02 line two of account B 03 line three of account B
Basically, move each cascading line for a single account to the end of the line before it, and then starting over again for each new account all the way down a sheet. Each new account starts with 01, and the following lines that continue with 02, 03, 04, etc... all go with the 01 line before it. When a new 01 line appears, that means its for a new account, and the 02, 03, 04... under that one goes with it.
The data is stuff like first names, last names, dates of birth, dollar amounts, etc.... so it would be data for one person on each line. The formatting and spacing is consistent on each line, so once I can get it into an Excel sheet, I can use a Fixed-Width delimiter straight down the sheet to separate all the data into specific formatted columns.
But I don't know how to get a big sheet of accounts with several cascading lines to merge into a single line for each account.
I can visualize all this in my head, but I don't know how to to make a macro to do it in UltraEdit.
Help!
Thanks!
statistics: Posted by Everscourge — 0:22 - Today — Replies 0 — Views 24