ndendrinos
Well-known Member
- Joined
- Jan 17, 2003
- Messages
- 1,694
Hello all,
35 cells in sheet 1 have formulas.
I need to transfer these cells to sheet2 as value only.
The "paste/special value is not an option.
I could use a very long macro to do this such as:
But this sure looks messy.
I know it can be done using (not sure if this is the word for it) an array?
starting like this:
How can I finish the code having it copy the target and paste it to "itself" as value only?
Many thanks
35 cells in sheet 1 have formulas.
I need to transfer these cells to sheet2 as value only.
The "paste/special value is not an option.
I could use a very long macro to do this such as:
Code:
Sub formulatovalue()
Range("D5").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H7").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
etc...etc...etc
End Sub
But this sure looks messy.
I know it can be done using (not sure if this is the word for it) an array?
starting like this:
Code:
Set MyRange = Range("C5,E5,G5,I5,K5,C8,E8,G8,I8,K8,C10,E10,G10,I10,K10,C12,E12,G12,I12,K12,C14,E14,G14,I14,K14,C16,E16,G16,I16,K16,C18,E18,G18,I18,K18,C20,E20,G20,I20,K20,C22,E22,G22,I22,K22")
If Not Intersect(Target, MyRange) Is Nothing Then
With Target
How can I finish the code having it copy the target and paste it to "itself" as value only?
Many thanks