• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Merge cells with identical date value automatically

I'm trying to create a basic Gantt Chart to plan our future workload for our estimating dept. I would like to be able to automatically merge the repetitive cells that contain the same year (ie on row 2) and also automatically merge the repetitive cells that contain the same month (ie on row 3).


F1 - is the input cell to change Gantt Chart start date (non-printing row)

H1:AI1 - is the Gantt Chart 28 day date range formatted as dd-mm-yy (non-printing row)

H2:AI2 - is the Gantt Chart 28 day date range formatted as yyyy

H3:AI3 - is the Gantt Chart 28 day date range formatted as mmm

H4:AI4 - is the Gantt Chart 28 day date range formatted as dd

H5:AI5 - is the Gantt Chart 28 day date range formatted as ddd (eg Wednesday)


This sheet will be updated regularly so would like the merging to be reset according to what new date is entered into cell F1.


Link to document as follows. Note that there is other code in this workbook for other functions.

https://dl.dropbox.com/u/38326386/Merge%20Column%20Cells%20With%20Same%20Value%20Automatically.xlsm


Thanks in advance.


Matt
 

Luke M

Excel Ninja
Rather than merging the cells, I would highly recommend just using the Horizontal Alignment - Center across selection feature. Merged cells tend to cause lots of headaches, ESPECIALLY when you are using VBA.
 
Top