Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compatibility alert - can't find cells causing problem odp Excel Discussion (Misc queries) 0 May 12th 09 02:50 AM
problem with find in merged cells Antonio Excel Programming 10 August 6th 07 05:58 PM
Problem finding merged cells RB Smissaert Excel Programming 13 August 12th 06 02:20 PM
Autofit with Merged Cells/Wrap Text Macro Problem elfmajesty Excel Discussion (Misc queries) 3 May 25th 06 06:32 PM
merged cells problem Libby Excel Programming 1 May 8th 04 09:42 AM


All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"