Merged Cells Causing Problem in Macro

E

Erica

I have an excel spreadsheet that has cells merged between rows, for example
cells C5 and C6 are merged and Cells C8 and C9 are merged. I tried writing
code to hide rows 6:6 and 9:9, but when I run it, it hides all rows 5, 6, 8,
and 9.

How can I get it to only hide rows 6 and 9?

When you hide the rows from the spreadsheet it works fine, you can select
the row and hide it and the contents of the merged cells remains in the upper
of the two rows in the range. But from a macro it hides both rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top