I am trying to loop through a named range in Excel and set its value equal to another named range that is dynamic in value (called SensitivityResults). How do I get Excel to essentially say:
Range("Scenario1").Value = Range("SensitivityResults").Value
Range("Scenario2").Value = Range("SensitivityResults").Value
Range("Scenario2").Value = Range("SensitivityResults").Value
etc...
My code as follows does not work:
Dim i As Integer
Dim s As Integer
For i = 1 To 20
For s = 1 To 20
Range("Active_Scenaro") = s
Calculate
Range("Scenario(i)").Value = Range("SensitivityResults").Value
Next s
Next i