Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot change part of a merged cell


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   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default Cannot change part of a merged cell

try

Worksheets("Transfer").Range(*"B22:G31").ClearCont ents

Regards,
Jayant

  #3   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default Cannot change part of a merged cell

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
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
How to change cell background color as part of the If statement? Jim H Excel Worksheet Functions 2 September 23rd 09 11:58 PM
Macro to change part of cell Amy Excel Discussion (Misc queries) 2 August 2nd 07 12:43 PM
Why only part of the text is merged from excel cell into word? Mohamed701 Excel Discussion (Misc queries) 6 August 2nd 07 12:31 PM
ClearContent & 'Cannot change part of a merged cell' error Richard[_34_] Excel Programming 4 June 27th 05 08:06 PM
Keeping one part of a formula same, but change other cell ref? kwelp Excel Discussion (Misc queries) 3 May 17th 05 10:00 PM


All times are GMT +1. The time now is 08:56 AM.

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

About Us

"It's about Microsoft Excel"