Hi guys, can anyone help me build a code that would resort the entire columns in attached workbook according to the header which are in date format, from oldest to newest.
reorderdatesoldtonew.xlsx
Thanks in advance.
Hi guys, can anyone help me build a code that would resort the entire columns in attached workbook according to the header which are in date format, from oldest to newest.
reorderdatesoldtonew.xlsx
Thanks in advance.
Hi rocksan,
I did a copy and paste using the Transpose. Then sorted by Column A (oldest to newest). Then copied and pasted Transpose a second time to get your answer.
See attached. Is this what you wanted?
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Hi Marvin,
I look at the attached and yes, I need it exactly to be like that but the process in VBA code also I cant have any additional data on the page after the process is done, because my other code is going to copy entire columns based on the dates. So just a clean reordering of the columns.
Thanks.
Hi rocksan,
Your question is a little vague if you want VBA code. Will there always be that exact number of rows and columns on your sheet or does it vary? Will there be more rows or columns? When we write VBA we need to see what things might change. So, you need to tell us what might move or grow or shrink. Will this data always start on A1? Will there be formulas in the data? All these things are important for writing successful VBA code.
Marvin,
Sorry about that.
Usually i just take the codes answered here and customize it to my needs. Just ask here to get the basic idea.
To answer your question, The number of rows rows and columns do change, but they are always in reverse format coming from the source, which is uneditable at my side. So yes it is dynamic.
Fortunately, The data is already modified by my macro to always start in A1, and I only copy values and number formatting. No formulas copied.
Hope that helps.
Thanks.
OK rocksan,
Here is your code that will do what I think you want. See it in the attached.
Marvin,
I tried your code, it works perfectly.
Thank very much for your time and patience Marvin.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks