Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying and sorting with some twists
Hi,
I created a spreadsheet called "Input" where users will be entering Lastname, Firstname type information into the following ranges: A24:A53 C24:C53 F24:F53 H24:H53 K24:K53 M24:M53 P24:P53 R24:R53 U24:U53 W24:W53 Sample data looks like this: Hendricks, Ted Bond, Sally Newman, Olivia Hodges, Faith Vaughan, Steven Hudson, Yvonne Burgess, Jessica There will be a variable number of names in each range. In other words although there are cells for 29 names, there will be a smaller number of names in each range. One range may have 12 names, another 5, and so on. I want a macro so that when the user clicks a macro button on the "Input" spreadsheet, it copies the information from the cell ranges mentioned above and pastes it into a spreadsheet called "Position Control" and into the following cells on the "Position Control" spreadsheet. Below is where each range of data should be copied. A24:A53 == copies and pastes it to the "Position Control" spreadsheet into A9:A38 C24:C53 == copies and pastes it to the "Position Control" spreadsheet into C9:C38 F24:F53 == copies and pastes it to the "Position Control" spreadsheet into E9:E38 H24:H53 == copies and pastes it to the "Position Control" spreadsheet into G9:G38 K24:K53 == copies and pastes it to the "Position Control" spreadsheet into I9:I38 M24:M53 == copies and pastes it to the "Position Control" spreadsheet into K9:K38 P24:P53 == copies and pastes it to the "Position Control" spreadsheet into M9:M38 R24:R53 == copies and pastes it to the "Position Control" spreadsheet into O9:O38 U24:U53 == copies and pastes it to the "Position Control" spreadsheet into Q9:Q38 W24:W53 == copies and pastes it to the "Position Control" spreadsheet into S9:S38 I would then like the names in each of the "Position Control" ranges to be sorted alphabetically. Unfortunately, the users entering names on the "Input" spreadsheet have been known to delete names by pressing the delete key or simply entering a blank over the name. The Lastname, Firstname's may not be contiguous. The sort should take this into account and still show names at the top of the sorted column in the "Position Control" spreadsheet. Another way of saying this is: Names may look this way in the Input spreadsheet. ************** Haywood, Lucas Coleman, Olivia Dowd, Jasmine Welch, Liam King, Chloe ************ But they should appear this way in the Position Control spreadsheet. ************ Coleman, Olivia Dowd, Jasmine Haywood, Lucas King, Chloe Welch, Liam ************* Thanks very much for your help with this. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying and sorting with some twists
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying and sorting with some twists
Thanks Claus,
This worked spectacularly. Have a great week !! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying and sorting with some twists
Outstanding!
-- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a new Worksheet with a few Twists | Excel Programming | |||
sorting and copying | Excel Worksheet Functions | |||
Auto Close A Workbook...With Two Twists! | Excel Programming | |||
Auto Close A Workbook...With Two Twists! | Excel Programming | |||
Auto Close A Workbook...With Two Twists! | Excel Programming |