ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   mergercell problem (https://www.excelbanter.com/excel-programming/341212-mergercell-problem.html)

SUNIL

mergercell problem
 
How do you code to clear contents of a merged cell

I am trying

If CELL.Interior.ColorIndex = 36 Then CELL.ClearContents

i get an error if the cell is merged with the next cell (e.g B5 and C5)



Mike Fogleman

mergercell problem
 
CELL.MergeArea.ClearContents

Mike F
"Sunil" wrote in message
...
How do you code to clear contents of a merged cell

I am trying

If CELL.Interior.ColorIndex = 36 Then CELL.ClearContents

i get an error if the cell is merged with the next cell (e.g B5 and C5)






All times are GMT +1. The time now is 03:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com