RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have been puzzling over this for a while, but I cannot come up with any form of solution.
I have a series of rows in a range - they are all grouped in a series of 2 rows containing data
I have a maximum of 40 rows, so I can have 20 'double line' entries on my sheet - the rest of the sheet is full of data, so I am only looking at Range E10:K49
Each of these 'double rows' I have assigned a name range dataRow1, dataRow2, dataRow3... dataRow20
I can get 2 rows to swap positions by using:
but what I'm really looking to do is find a simple way for a user to potentially reposition any row anywhere within the range. I was thinking perhaps employing a userform to display all the rows and somehow re-arrange them there as a visual aid and then the sheet would update accordingly...
I know this is a big ask, but I have searched everywhere for something which will allow me to do this...
If you can perhaps point me in the right direction, I'd be very grateful
Thanks
I have a series of rows in a range - they are all grouped in a series of 2 rows containing data
I have a maximum of 40 rows, so I can have 20 'double line' entries on my sheet - the rest of the sheet is full of data, so I am only looking at Range E10:K49
Each of these 'double rows' I have assigned a name range dataRow1, dataRow2, dataRow3... dataRow20
I can get 2 rows to swap positions by using:
Code:
Dim Range1 As Variant, Range2 As Variant
Range1 = Worksheets("DataSheet").Range("dataRow" & Row)
Range2 = Worksheets("DataSheet").Range("dataRow" & OtherRow)
Worksheets("DataSheet").Range("dataRow" & Row) = Range2
Worksheets("DataSheet").Range("dataRow" & OtherRow) = Range1
but what I'm really looking to do is find a simple way for a user to potentially reposition any row anywhere within the range. I was thinking perhaps employing a userform to display all the rows and somehow re-arrange them there as a visual aid and then the sheet would update accordingly...
I know this is a big ask, but I have searched everywhere for something which will allow me to do this...
If you can perhaps point me in the right direction, I'd be very grateful
Thanks