-
Irevised some code:
to copy values
[vba]
Sub M_snb()
Sheets("Sheet2").Range("A1:A4,C1:E4,G1:H4").Name = "snb_002"
For Each ar In [snb_002].Areas
Sheets("sheet3").Range(ar.Address) = ar.Value
Next
End Sub
[/vba]to copy formulae:
[vba]
Sub M_snb()
Sheets("Sheet2").Range("A1:A4,C1:E4,G1:H4").Name = "snb_002"
For Each ar In [snb_002].Areas
Sheets("sheet3").Range(ar.Address) = ar.Formula
Next
End Sub
[/vba]
If the named range scope is 'worksheet', no reference to a sheet is being made
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules