hiding merged columns

macro_panic

New Member
Joined
Mar 17, 2002
Messages
47
i have a problem hiding a column as part of a macro routine. i have three sets of numbers in columns B, C, and D with a title merged across the three columns in cells B2:D2. i recorded a macro to hide column C only but when the macro is run it hides columns B, C, and D because of the merged cells. is there any way to override the merge and just select one column to hide, or do i have to demerge, hide, then remerge? hope i explained that right. thanks in advance.

(i have paraphrased my worksheet for the purpose of explaining my problem. sadly the sheet layout is rather complicated and i am trying to avoid unmerging / remerging)
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Jay Petrulis

MrExcel MVP
Joined
Mar 17, 2002
Messages
2,040
Hi,

I think Excel XP now allows you to do what you wish, but if you don't want to upgrade to XP, then you can do what you want by centering the data across the selection.

Unmerge the cells you have already merged. Then, with the same range selected, choose Format>Cells>Alignment>Text Alignment = Center Across Selection.
 

Forum statistics

Threads
1,143,640
Messages
5,719,987
Members
422,257
Latest member
Calion

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top