Cannot changed part of a merged cell error

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,919
Office Version
  1. 2007
Platform
  1. Windows
Hi,

Please see screenshots
.
You will see that the 2 cells in question are G49 & G50
This is the simple code im using just to clear cells.
But when i run the code i am told it cant because they are merged ?

Why is this thanks

VBA Code:
Private Sub ClearAllPageDetails_Click()
Range("G13").ClearContents
Range("N18").ClearContents
Range("G27:N36").ClearContents
Range("G46:G48").ClearContents
Range("G49").ClearContents
Range("G50").ClearContents
End Sub
 

Attachments

  • 6307.jpg
    6307.jpg
    132.6 KB · Views: 8
  • 6308.jpg
    6308.jpg
    23.7 KB · Views: 8
  • 6309.jpg
    6309.jpg
    32.5 KB · Views: 7

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Panic over.
It is because column H is hidden

Maybe somebody can explain why it then thinks its merged ?
If column G is visable but column H is hidden then surely thats wrong as bothwould then be eith visable or hidden at the same time correct /
 
Upvote 0
No, you can hide one column independently of the other.
 
Upvote 0
Strange as like i say you can see column G but you cant see column H or I so why does it say merged ?
 
Upvote 0
Given that the Merge and Center button is highlighted in your picture, it would appear you have merged cells. You can certainly merge cells in columns G and H but hide column H.
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,471
Members
453,726
Latest member
JoeH57

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
Back
Top