squidmark
Board Regular
- Joined
- Aug 1, 2007
- Messages
- 105
Hi everyone.
Please, save me from the purgatory that is going through 62,000 lines manually.
I've got a list of notes some 62,000 lines long. Column A is the customer number. Column B is the note.
I need to combine all of the notes in column B into a single cell with the other notes relating to the common customer, with a carriage return (char(10)) in between, putting them each on a different line in the same cell.
There are customers with more than 50 notes, so no form of if/then is going to work (that I know of).
Sample Data, each line is in a different row, so the following would be in the A1:B13 range:
ColA ColB
3500 8/18/2010 - lvm for A/P
3500 1/4/2011 - emld RE pmt stat
3500 2/3/2011 - emld RE pmt stat
3848 2/3/2011 - lvm for A/P
3848 1/13/2011 - lvm for A/P
3848 1/28/2011 - lvm for A/P
3860 2/3/2011 - emld RE pmt stat
3860 3/8/2011 - emld RE pmt stat
3860 4/5/2011 - emld RE pmt stat
3860 3/4/2011 - lvm for A/P
3860 2/10/2011 - lvm for A/P
3860 8/18/2010 - clld & n/a
3860 8/12/2010 - called & N/A
The sample below would end up in three cells, as in the following (the range here would be A1:B3, as all the notes for customer 3500 are in cell B1, all those for customer 3848 are in cell B2, etc...)
ColA ColB
3500 8/18/2010 - lvm for A/P
....... 1/4/2011 - emld RE pmt stat
....... 2/3/2011 - emld RE pmt stat
3848 2/3/2011 - lvm for A/P
...... 1/13/2011 - lvm for A/P
...... 1/28/2011 - lvm for A/P
3860 2/3/2011 - emld RE pmt stat
...... 3/8/2011 - emld RE pmt stat
...... 4/5/2011 - emld RE pmt stat
...... 3/4/2011 - lvm for A/P
...... 2/10/2011 - lvm for A/P
...... 8/18/2010 - clld & n/a
...... 8/12/2010 - called & N/A
(the dots are supposed to be blanks, but I'm having formatting issues)
There has to be a good VBA way to do this. But I'm just starting to learn VBA and this is kicking my rear-end.
Please, save me from the purgatory that is going through 62,000 lines manually.
I've got a list of notes some 62,000 lines long. Column A is the customer number. Column B is the note.
I need to combine all of the notes in column B into a single cell with the other notes relating to the common customer, with a carriage return (char(10)) in between, putting them each on a different line in the same cell.
There are customers with more than 50 notes, so no form of if/then is going to work (that I know of).
Sample Data, each line is in a different row, so the following would be in the A1:B13 range:
ColA ColB
3500 8/18/2010 - lvm for A/P
3500 1/4/2011 - emld RE pmt stat
3500 2/3/2011 - emld RE pmt stat
3848 2/3/2011 - lvm for A/P
3848 1/13/2011 - lvm for A/P
3848 1/28/2011 - lvm for A/P
3860 2/3/2011 - emld RE pmt stat
3860 3/8/2011 - emld RE pmt stat
3860 4/5/2011 - emld RE pmt stat
3860 3/4/2011 - lvm for A/P
3860 2/10/2011 - lvm for A/P
3860 8/18/2010 - clld & n/a
3860 8/12/2010 - called & N/A
The sample below would end up in three cells, as in the following (the range here would be A1:B3, as all the notes for customer 3500 are in cell B1, all those for customer 3848 are in cell B2, etc...)
ColA ColB
3500 8/18/2010 - lvm for A/P
....... 1/4/2011 - emld RE pmt stat
....... 2/3/2011 - emld RE pmt stat
3848 2/3/2011 - lvm for A/P
...... 1/13/2011 - lvm for A/P
...... 1/28/2011 - lvm for A/P
3860 2/3/2011 - emld RE pmt stat
...... 3/8/2011 - emld RE pmt stat
...... 4/5/2011 - emld RE pmt stat
...... 3/4/2011 - lvm for A/P
...... 2/10/2011 - lvm for A/P
...... 8/18/2010 - clld & n/a
...... 8/12/2010 - called & N/A
(the dots are supposed to be blanks, but I'm having formatting issues)
There has to be a good VBA way to do this. But I'm just starting to learn VBA and this is kicking my rear-end.
Last edited: