Hello friends!
I would like to use a (fairly simple) macro to copy paste scenario outcomes. Values only.
As context: I have 2 drop-down buttons for scenarios, and with every change the scenario outcomes (an array of cells) changes. I would like to copy-paste these into a summary page.
I have tried to record the macro myself, but the problem is that it ONLY records the LAST known scenario. And copy-pastes this for all options.
Below an example line of macro code. Scenario is selected in cell L11 (e.g. "High" or "Base"). Copy Paste ranges would be e.g. S155:BP165, or S131:BP151.
The copy-paste location ranges work, but it only replicates the last known scenario (e.g. "High" across all cases)
Any tips? A swift response would be much appreciated! best wishes
Sub Macro15()
'
' Macro15 Macro
'
'
Range("L11").Select
ActiveWindow.SmallScroll Down:=-28
Range("S131:BP151").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=21
Range("S155:BP165").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("L11").Select
ActiveWindow.SmallScroll Down:=-21
Range("S131:BP151").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=28
Range("S179").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I would like to use a (fairly simple) macro to copy paste scenario outcomes. Values only.
As context: I have 2 drop-down buttons for scenarios, and with every change the scenario outcomes (an array of cells) changes. I would like to copy-paste these into a summary page.
I have tried to record the macro myself, but the problem is that it ONLY records the LAST known scenario. And copy-pastes this for all options.
Below an example line of macro code. Scenario is selected in cell L11 (e.g. "High" or "Base"). Copy Paste ranges would be e.g. S155:BP165, or S131:BP151.
The copy-paste location ranges work, but it only replicates the last known scenario (e.g. "High" across all cases)
Any tips? A swift response would be much appreciated! best wishes
Sub Macro15()
'
' Macro15 Macro
'
'
Range("L11").Select
ActiveWindow.SmallScroll Down:=-28
Range("S131:BP151").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=21
Range("S155:BP165").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("L11").Select
ActiveWindow.SmallScroll Down:=-21
Range("S131:BP151").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=28
Range("S179").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub