Code:
Sub ActiveMgmtT1()
Dim Multiplier As String
Dim Scenario As Integer
Dim ThisRateR1 As Variant
Dim ThisAmtA1, Initial As Long
Dim NewAmtM1, NewAmt2M1 As Long
Dim NewAmtM2, NewAmt2M2 As Long
Dim NewAmtM3, NewAmt2M3 As Long
Dim NewAmtM4, NewAmt2M4 As Long
Multiplier = Range("AA17").Value
Initial = Range("AB34").Value
Scenario = Range("AA18").Value
ThisAmtA1 = Range("AC34").Value
ThisRateR1 = Range("AD34").Value
NewAmtM1 = Initial - ThisAmtA1
NewAmt2M1 = ThisAmtA1 * ThisRateR1
NewAmtM2 = Initial - (Abs(ThisAmtA1) / ThisRateR1)
NewAmt2M2 = Initial - (Abs(ThisAmtA1) * ThisRateR1)
NewAmtM3 = Abs(Initial) - (ThisAmtA1 / ThisRateR1)
NewAmt2M3 = Initial - Abs(ThisAmtA1)
NewAmtM4 = Abs(Initial) - ThisAmtA1
NewAmt2M4 = Abs(ThisAmtA1) * ThisRateR1
If Multiplier = "M" And Scenario = 1 And ThisAmtA1 > 0 Then
Range("AB18").Value = NewAmtM1 And Range("AC18").Value = NewAmt2M1
ElseIf Multiplier = "M" And Scenario = 2 And ThisAmtA1 > 0 Then
Range("AB18").Value = NewAmtM2 And Range("AC18").Value = NewAmt2M2
ElseIf Multiplier = "M" And Scenario = 3 And ThisAmtA1 > 0 Then
Range("AB18").Value = NewAmtM3 And Range("AC18").Value = NewAmt2M3
ElseIf Multiplier = "M" And Scenario = 4 And ThisAmtA1 > 0 Then
Range("AB18").Value = NewAmtM4 And Range("AC18").Value = NewAmt2M4
Else
Range("AB18").Value = 0 And Range("AC18").Value = 0
End If
End Sub
This is probably an easy fix, but every time the macro is run it returns 0, 0 in cells AB18 and AC18.