Wanna_Be_Guru
New Member
- Joined
- Jul 17, 2006
- Messages
- 4
I am trying to set up a macro that will automatically take a range of data starting in A4 and running horizontally to K4 with headers of:
The sequence I need to align the printable pages with is the Validation Code. (EXAMPLE - 1004GAS or 9095ELEC). The numbers are sequential... Well sort of. They are not EXACTLY in numerical order, but may skip integers like 1004 to 1021 then possibly to 5023 (you get my drift). I can easily make it so that I only get the raw integer by itself but I need to print the Validation Code as an indicator to what type of order it is and exactly how it will be displayed on the report at the end of the day.
I need some help getting this macro or even module to find the first line that contains the lowest validation code, copy that line (or lines if that validation code is repeated) and put it into another sheet (within the same workbook, preferably), and then go to the next highest validation code and do the same thing until it reaches the end of the data. This whole process will give me a pretty and tidy (ready to print) format for all of my orders.
So far, I am manually cutting and pasting all of this information into one large sheet that usually takes up about 1 MB of space and roughly 3 to 6 hours of my time (depending on the number of orders placed which varies from week to week). I know that there has to be a better way of doing this, so I am done fretting and now I am posting.
The way that my final layout look has this as the header row (repeated on every page):
Desperately seeking sleep,
Ty (Wanna_Be_Guru)
- Account # __ Customer Name __ Address __ City __ State __ Zip __ Phone __ SalesID __ SalesManID __ Import Date __ Validation Code
The sequence I need to align the printable pages with is the Validation Code. (EXAMPLE - 1004GAS or 9095ELEC). The numbers are sequential... Well sort of. They are not EXACTLY in numerical order, but may skip integers like 1004 to 1021 then possibly to 5023 (you get my drift). I can easily make it so that I only get the raw integer by itself but I need to print the Validation Code as an indicator to what type of order it is and exactly how it will be displayed on the report at the end of the day.
I need some help getting this macro or even module to find the first line that contains the lowest validation code, copy that line (or lines if that validation code is repeated) and put it into another sheet (within the same workbook, preferably), and then go to the next highest validation code and do the same thing until it reaches the end of the data. This whole process will give me a pretty and tidy (ready to print) format for all of my orders.
So far, I am manually cutting and pasting all of this information into one large sheet that usually takes up about 1 MB of space and roughly 3 to 6 hours of my time (depending on the number of orders placed which varies from week to week). I know that there has to be a better way of doing this, so I am done fretting and now I am posting.
The way that my final layout look has this as the header row (repeated on every page):
- Account # _ Customer Name _ Address _ City _ State _ Zip _ Phone _ SalesID _ SalesManID _ Import Date _ Validation Code _ Ref Code
- 123456789000007 _ JOSE VITO _ 120 GRIN PL 1F _ ALBANY _ NY _ 12234 _ 5555555555 _ 800 _ 8502003 _ 8/25/2006 _ 2003GAS _ 2003
Desperately seeking sleep,
Ty (Wanna_Be_Guru)