I am writing a code for automatically reading in data from a closed workbook.
I am having some problems with the formating. The problem is when I am reading in some text in a row (each text is followed by six empty cells), and I am trying to merge the following blank cells.
For Row = 1 To NumRows
For Column = 3 To LastColumn
Range(Cells(Row, Column).Address, Cells(Row + 1, Column + 6).Address).Merge
...
This merges everything into one cell. If I have 10 cells containing text, I want ten merged cells.
Any ideas?
It does merge your whole cells because you parse 1 by 1.
Meaningly, what your program do is:
A1A1:A6are mergedA2A2toA6!What you can do:
stepoption on your for loops – see here for more informationcontinuestatement in your for loopRegards,