0% found this document useful (0 votes)
546 views

Excel - Using VBA Stack Overflow

The document describes a question about copying a specific value from a cell in Excel using VBA when a dropdown scenario selection is changed. The user has created 3 scenarios that appear in a dropdown cell and change outputs on the sheet using VBA code. They want to create a summary table that copies the value from cell E13, which contains an NPV formula that changes with each scenario selection, and pastes it next to the scenario name (e.g. "Scenario 1 = x")

Uploaded by

agewisdom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
546 views

Excel - Using VBA Stack Overflow

The document describes a question about copying a specific value from a cell in Excel using VBA when a dropdown scenario selection is changed. The user has created 3 scenarios that appear in a dropdown cell and change outputs on the sheet using VBA code. They want to create a summary table that copies the value from cell E13, which contains an NPV formula that changes with each scenario selection, and pastes it next to the scenario name (e.g. "Scenario 1 = x")

Uploaded by

agewisdom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

excel - Using VBA code to Copy Specific value from a cell when the dr... https://stackoverflow.com/questions/40734860/using-vba-code-to-copy-...

I am new to VBA and have only


recently been developing my excel
skills.

I have created 3 different scenarios for


an investment project situation, these
scenarios appear in cell "h13" as a
drop down box with three options
being available, best case/worst
case/base case.

When you select each scenario the


various outputs will change on the
sheet and I have set up the following
code to change the outputs and
display the relevant ones according to
the scenario:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$H$13" Then
    ActiveSheet.Scenarios(Target.Value).Show
  End If

Now, what I want to achieve is the


following:

In Cell E13 I have a numeric value


that is my main concern (I should note
this is an NPV Formula). Every time
we change scenario this value
obviously changes. I would like to
create a summary table that is simply
something like this: Scenario 1 = x
Join Stack Overflow to learn, share knowledge, and build your career.
This site uses cookies to deliver our services and to show you relevant ads and job listings. By using our site, you
acknowledge that you have read and understnd our . Your use of

1 of 1 22/8/18, 22:00

You might also like