Auto Merge of Cells

Excelboy_01

New Member
Joined
Aug 5, 2011
Messages
32
Hello People,

I would really appreciate it if any one would help me with a code that can used to mergecells.
Basically, assume I have a sheet as indicated below. I want if I enter say a 13 (week number
for year 2011) in cell V2, I would like to Merge all cells (in column 1) until it reaches cell I1
where literaly the year starts(.i.e. by noticing 1 in cell I2). Then merge the other cells
for year 2010, until cell A1 (since there no more entry beyond 47 i.e. Cell A2)

/| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S |T | U | V |

-+---+---+---+----+---+---+---+---+---+---+---+---+----+----+---+---+---+----+---+---+- 1|...............2010...........................|........................2011.............................| -+---+---+---+----+---+---+---+---+---+----+---+---+---+----+---+----+---+----+----+----+---+
2
|47 |48 | 49| 50 | 51| 52|52 |53 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10|11 | 12 | 13| -+---+---+---+----+---+---+---+---+---+----+---+---+---+----+---+----+---+----+----+----+---+

PS: I need auto merge because the weeks constantly change. At one point I can insert week 30 in
cell V2, so it would emerge all cells till arrives to 1 in column 2.

Thanks a lot for your help

Moses
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

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