Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I've merged cells B22, C22, D22, E22, F22, G22 to give me 1 cell B22 Also merged B23, C23, D23, E23, F23, G23 to create B23 and this continues to B31. I'm trying to clear range B22 to B31 and I've put in this code 'Worksheets("Transfer").Range("B22:B31").ClearCont ents I get the runtime error 1004 - cannot change part of a merged cell. I'm able to get the code working on a cell that's not merged but not on a merged cell. Any work around to this? -- happyPotter ------------------------------------------------------------------------ happyPotter's Profile: http://www.excelforum.com/member.php...fo&userid=1510 View this thread: http://www.excelforum.com/showthread...hreadid=384873 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try
Worksheets("Transfer").Range(*"B22:G31").ClearCont ents Regards, Jayant |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For i = 22 To 31
Range("B" & i).MergeArea.ClearContents Next i I would recommend this one. Regards, Jayant |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change cell background color as part of the If statement? | Excel Worksheet Functions | |||
Macro to change part of cell | Excel Discussion (Misc queries) | |||
Why only part of the text is merged from excel cell into word? | Excel Discussion (Misc queries) | |||
ClearContent & 'Cannot change part of a merged cell' error | Excel Programming | |||
Keeping one part of a formula same, but change other cell ref? | Excel Discussion (Misc queries) |