Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2020, 04:13 AM
TechMet Ken TechMet Ken is offline Re-arranging Columns After Dynamic Array Filtering Windows 10 Re-arranging Columns After Dynamic Array Filtering Office 2019
Novice
Re-arranging Columns After Dynamic Array Filtering
 
Join Date: Oct 2020
Posts: 1
TechMet Ken is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 10-15-2020, 05:27 AM
Purfleet Purfleet is offline Re-arranging Columns After Dynamic Array Filtering Windows 10 Re-arranging Columns After Dynamic Array Filtering Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

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
Reply With Quote
Reply

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
Re-arranging Columns After Dynamic Array Filtering 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
Re-arranging Columns After Dynamic Array Filtering Convert String Array to Integer Array from a User Input? tinfanide Excel Programming 4 12-26-2012 08:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft