#1
|
|||
|
|||
Re-arranging Columns After Dynamic Array Filtering
I have created a filtered list from a data set using dynamic array filtering and with that new filtered set of data I need to re-arrange the columns in a different order to populate a report. Example: Say I have columns A, B, C, and D but I need them arranged C, B, D, A for a report. How can I do this and keep the new set of data dynamic?
|
#2
|
|||
|
|||
You can do something like this before any filtering, if you know what columns to move. Becareful though as the column to delete will move as you insert.
Code:
Sub MoveCol() Range("c:c").Copy Range("a:a").Insert shift:=xlLeft Range("D:D").Delete End Sub To make it more robust, you could get the code to 'look' for the header so you move the correct column according to the header. Please make sure you add examples so that we dont have to waste time recrating data whihc then might be in the wrong format as well |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chart with Dynamic Array | kilroyscarnival | Excel | 2 | 10-07-2020 06:33 AM |
How to Split Dynamic merge field values to multiple columns | Naveen Dhanaraj | Mail Merge | 17 | 02-19-2020 01:18 AM |
Creating a dynamic array for some formulas | Bumba | Excel | 2 | 01-27-2019 05:10 AM |
Filtering slides, dynamic summary ? Looking for advice | hugmeplz | PowerPoint | 0 | 04-25-2017 04:11 AM |
Convert String Array to Integer Array from a User Input? | tinfanide | Excel Programming | 4 | 12-26-2012 08:56 PM |