Hello excel/vba-experts,
I have a table, which collects values (return rates) calculated by different sensitivity scenarios (e.g. if operational costs are 1% higher, my project return rate shrinks and this new value is automatically saved in this table). Let's call it Input Table covering for example (A1:C5). It is dynamic: Every time I choose a sensitivity parameter (1%-10%), I get a new result in this matrix and the previous result is gone (it's a simple function "if sensitivity = 1%, then A1 = return rate" and so on for each cell in this Input Table).
Now I want every time I get a new result in this Input Table to decide, if I want to copy this new result into my project overview table, lets call it Output table, e.g. (D1:F5). Therefore I created a button "transfer the result" and I'm trying to program following macros, which finds this new result and transfers only it, without overwriting previously transferred results:
Copy the values of cells in the Input Table (A1:C5) into the according cells of Output Table (D1:F5) when:
1) the Input Table cell has a value (is not blank any more)
2) the according Output Table cell has no value yet.
I am a very beginner and I wrote my code using different forum posts but it's not completely functioning:
Thank you in advance for corrections or new solutions (there are many ways to transfer/copy, I just need a functioning one!![]()
Sub transfer the result_click() Dim Output As Range Range("A1:C5").Offset(1, 0).Select For Each Output In ActiveSheet.Range("D1:E5").Cells If ActiveCell.Value > 0 Then If Output.Value = "" Then Output.Value = Range("A1:C5").Value End If Next End Sub
![]()
Bookmarks