![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
And what do you want to do if the same page number appears twice?
I don't have the excitement levels to code this at present but would approach this in the following way: Replace all spaces with nothing Split into an array Loop the array to convert the dashes into a series of numbers separated by commas Convert the array back into a string separated by commas Split into an array a second time and do a bubblesort to arrange them in ascending order Convert the final array back into a string separated by commas You could remove a couple of steps if you converted the initial string into an ado.recordset which simplifies the sorting requirement.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
GlowingApple | Excel | 1 | 02-17-2016 07:18 PM |
![]() |
expert4knowledge | Excel | 2 | 09-09-2014 06:27 AM |
![]() |
delasson | Word VBA | 3 | 12-10-2012 03:54 AM |
How to use named ranges in excel vba? | bosve73 | Excel Programming | 4 | 01-25-2012 09:26 AM |
Dynamic Named Ranges using text | hannu | Excel | 0 | 06-22-2010 04:42 PM |