D
Dave Peterson
So your selection is a combination of constants and formulas?
If yes, copy the range, paste the formulas and then clear the constants from
that pasted range.
Something like:
dim rng as range
dim destcell as range
set rng = selection
set destcell = worksheets("sheet1").range("a1")
rng.copy
destcell.pastespecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
on error resume next
destcell.resize(rng.rows.count,rng.columns.count) _
.cells.specialcells(xlcelltypeconstants).clearcontents
If yes, copy the range, paste the formulas and then clear the constants from
that pasted range.
Something like:
dim rng as range
dim destcell as range
set rng = selection
set destcell = worksheets("sheet1").range("a1")
rng.copy
destcell.pastespecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
on error resume next
destcell.resize(rng.rows.count,rng.columns.count) _
.cells.specialcells(xlcelltypeconstants).clearcontents