I've doing a waste calculation exercise at work, and I've got several dynamic named ranges whose cells all contain values arrived at by formulae. I need a module that will copy the values within a dynamic named range onto another sheet without copying the formulae themselves, just the values that the cells contain. I tried to use this:
Sub Sample()
Dim wsI As Worksheet, wsO As Worksheet
Set wsI = ThisWorkbook.Sheets("Sheet1")
Set wsO = ThisWorkbook.Sheets("Sheet1")
wsI.Range("Pct_waste").Copy wsO.Range("B4")
End Sub
But this copies the formulae, which is no use. And I can't just use absolute references because I need to be able to quickly add new data. Ultimately, I intend to create a macro that will copy the values within the dynamic named ranges to a new sheet, then sort these values numerically and plot them on a scatter chart. So I need to find a way to copy all the values in my dynamic named ranges without copying the formulae themselves.
Also, I'm fairly novice when it comes to VBA so go easy!