Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default VBA script to delete content in merged cells.

Is there a VBA script to delete content in merged cells?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default VBA script to delete content in merged cells.

See one way at your previous thread.

Calle wrote:

Is there a VBA script to delete content in merged cells?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA script to delete content in merged cells.

Hi Calle,

See my response in your earlier thread.

However, more generally:

'=============
Public Sub Tester()
Dim rng As Range
Dim rCell As Range

Set rng = Range("A1:A10")

For Each rCell In rng.Cells
With rCell
If .MergeCells Then
.MergeArea.ClearContents
Else
.ClearContents
End If
End With
Next rCell

End Sub
'<<=============


---
Regards,
Norman



"Calle" wrote in message
...
Is there a VBA script to delete content in merged cells?



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
display content of merged cells LucaRR Excel Discussion (Misc queries) 2 December 30th 09 11:08 AM
Query content of merged cells Lucio Menci Excel Worksheet Functions 3 February 27th 09 03:35 PM
How to delete the content of Excel cells from VBS script? Claudia d'Amato Excel Discussion (Misc queries) 2 June 21st 08 12:55 PM
How do I delete only the content of cells that are NOT protected? DrDisk7 Excel Discussion (Misc queries) 1 May 17th 08 04:38 PM
Script doesn't work when cells are merged. [email protected] Excel Discussion (Misc queries) 2 January 26th 07 07:36 AM


All times are GMT +1. The time now is 11:39 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"