View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default populate cells within merge area

for charting purposes i need to populate cells within a merged area in my code.
If myrng is the merged area and myrng.cells(1) contains mydate then...
I've tried

dim cl as range
dim myrng as range
set myrng = Range("MergedRange")

for each cl in myrng.cells
cl.value = cl.MergeArea.cells(1).value
next cl
unfortunately, all cells in the merged range remain blank except for cells(1)

I've noticed that I can manually populate all cells in a merged range by
copying a value and then using pasteSpecial/formulas. In lieu of any better
sugestions i'll write code around this principle
Thanks