I have a simple spreadsheet comprising columns A to F. I want to copy just column D using VBA and copy to another column (as part of a larger macro). Simple so far. However. a number of the rows have the columns merged across all 6 so when I select the column using VBA all the columns are selected and copied. I just need to copy column D. My code is:
i also tried with FirstRow and LastRow as variables corresponding to the first and last row to be copied but it still didn't work.
but if I use Record Macro and click on column D at the top, I get
and this ignores the rows with the merged columns.
Any suggestions? It would not be practicable to unmerge or delete the rows with the merged columns.
Thanks in advance.
Bookmarks