How to group columns based on date with VBA?

nath1989

New Member
Joined
Jul 24, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
So I have this worksheet for tracking the status of several projects over time (like a gantt chart but not exactly one) and I think it would be better for visualization if the columns were automatically grouped together based on month/year, since there's a lot of columns. I'm struggling to figure out a code for this, my worksheet looks something like this:

example.PNG


and the date columns should be grouped by month and year.

I'd be really grateful if someone could help me with this!

Tks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
What do you mean by grouped by month and year. That is a vague term. Suggest you post a mocked up solution so we can be sure of what you want. Additionally, we cannot manipulate data in a picture. Suggest you use XL2BB function.
 
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top