Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merged Cells Causing Problem in Macro
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merged Cells Causing Problem in Macro
Other than the fix of "unmerging" cells before selection and Hiding
"Erica" wrote: 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merged Cells Causing Problem in Macro
try running your code but instead loop from bottom to top
-- GNN "Erica" wrote: Other than the fix of "unmerging" cells before selection and Hiding "Erica" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compatibility alert - can't find cells causing problem | Excel Discussion (Misc queries) | |||
problem with find in merged cells | Excel Programming | |||
Problem finding merged cells | Excel Programming | |||
Autofit with Merged Cells/Wrap Text Macro Problem | Excel Discussion (Misc queries) | |||
merged cells problem | Excel Programming |