excel-vba

Merged Cells / Ranges

Think twice before using Merged Cells/Ranges

First of all, Merged Cells are there only to improve the look of your sheets.

So it is literally the last thing that you should do, once your sheet and workbook are totally functional!


Where is the data in a Merged Range?

When you merge a Range, you’ll only display one block.

The data will be in the very first cell of that Range, and the others will be empty cells!

One good point about it : no need to fill all the cells or the range once merged, just fill the first cell! ;)

The other aspects of this merged ranged are globally negative :

  • If you use a method for finding last row or column, you’ll risk some errors

  • If you loop through rows and you have merged some ranges for a better readability, you’ll encounter empty cells and not the value displayed by the merged range


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow