NateW
12-04-2007, 12:26 PM
Hi, Folks.
I'm looking for a way for a macro to look at a number, and tell from the number of digits before the character " - " whether the number is an order number or a requisition number.
The order number could look like this: 2576839-4.1
or like this: 2576839-4.112
or like this: 2576839-14.1
and so on, but in every instance of an order number, it would be 7 digits and then a " - ".
The requisition number could look like this: 321835-1
or like this: 321835-12
or like this: 321835-12.2
and so on, but in every instance of a req number, it would be 6 digits and then a " - ".
The digits after the " - " are still important, as they represent line numbers - so, in this sheet, there might be one reference to 321835, or there may be multiple, as in 321835-1, 321835-2, 321835-3.
The macro will need to go through a lengthy list of these numbers, in order to create a sorted list, with a blank row between unique numbers. Here's how the output could look:
321835-1
321835-2
321836-1
321837-3
321837-7
321837-14
Any ideas? As usual, any help is greatly appreciated.
Thanks!
Nate.
I'm looking for a way for a macro to look at a number, and tell from the number of digits before the character " - " whether the number is an order number or a requisition number.
The order number could look like this: 2576839-4.1
or like this: 2576839-4.112
or like this: 2576839-14.1
and so on, but in every instance of an order number, it would be 7 digits and then a " - ".
The requisition number could look like this: 321835-1
or like this: 321835-12
or like this: 321835-12.2
and so on, but in every instance of a req number, it would be 6 digits and then a " - ".
The digits after the " - " are still important, as they represent line numbers - so, in this sheet, there might be one reference to 321835, or there may be multiple, as in 321835-1, 321835-2, 321835-3.
The macro will need to go through a lengthy list of these numbers, in order to create a sorted list, with a blank row between unique numbers. Here's how the output could look:
321835-1
321835-2
321836-1
321837-3
321837-7
321837-14
Any ideas? As usual, any help is greatly appreciated.
Thanks!
Nate.