Hi Guys,
I have 10 product, in value C3 when I put 1, macro caluclate & copy/paste some values for product 1, when put 2 in C3 macro calculate & copy/paste some values for product 1 and for product 2, when 1 put 3 in C3 macro calculate & copy/paste some values for product 1 and for product 2 and product. In another sheet "DCF Quarterly" i have some values for calculation. When choose 1 in C3 values appear for product 1, when I put 2 in C4 values appears for product 2. Is it possible sum up those values? For example:
I choose 3 in C3, then in "DCF Quarterly" macro caluclate & copy/paste some values for product 1&2&3, but each time during the calcuatlion some values appear for product 1 , then they are replaced by 2 & replace by product 3.s it possible sum up those values for 1&2&3 and present somewhere in "DCF Quarterly" sheet.
I have 10 product, in value C3 when I put 1, macro caluclate & copy/paste some values for product 1, when put 2 in C3 macro calculate & copy/paste some values for product 1 and for product 2, when 1 put 3 in C3 macro calculate & copy/paste some values for product 1 and for product 2 and product. In another sheet "DCF Quarterly" i have some values for calculation. When choose 1 in C3 values appear for product 1, when I put 2 in C4 values appears for product 2. Is it possible sum up those values? For example:
I choose 3 in C3, then in "DCF Quarterly" macro caluclate & copy/paste some values for product 1&2&3, but each time during the calcuatlion some values appear for product 1 , then they are replaced by 2 & replace by product 3.s it possible sum up those values for 1&2&3 and present somewhere in "DCF Quarterly" sheet.
Code:
Sub RunTests()'
' RunTests Macro
'
Sheets("Portfolio Overview").Select
Dim i As Integer
Dim ifrom, ito As Integer
ifrom = Range("C2").Value
ito = Range("C3").Value
For i = ifrom To ito
Sheets("DCF Quarterly").Select
Range("B4") = i
Range("R9:R18").Select
'Application.CutCopyMode = False
Selection.Copy
Sheets("Portfolio Overview").Select
Cells(11 + i - ifrom, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Cells(11 + i - ifrom, 1).Value = i
Next i
End Sub
Last edited: