charlie11k
New Member
- Joined
- Dec 27, 2008
- Messages
- 45
Just trying to get this answered......
This is what I have:
Dim i As Long, Multiplier As Double, aSum As Double
aSum = WorksheetFunction.Sum(Range("E224:E264"))
Select Case aSum
Case Is < 6000: Multiplier = 0
Case Is < 7000: Multiplier = 0.01
Case Is < 8000: Multiplier = 0.02
Case Is < 9000: Multiplier = 0.04
Case Is < 10000: Multiplier = 0.05
Case Is < 11000: Multiplier = 0.06
Case Is < 12000: Multiplier = 0.08
Case Is >= 12000: Multiplier = 0.1
End Select
For i = 224 To 264
Range("H" & i).Value = Range("E" & i).Value * Multiplier
Next i
I also need to calculate cells in column "I" where if E224:E264 is more than 10k but less than 11k, I want that cell in "I" to multiply cell E respectively by 19%. I would like to somehow set the range 224:264 so I don't have to change it in multiple places. Help?
This is what I have:
Dim i As Long, Multiplier As Double, aSum As Double
aSum = WorksheetFunction.Sum(Range("E224:E264"))
Select Case aSum
Case Is < 6000: Multiplier = 0
Case Is < 7000: Multiplier = 0.01
Case Is < 8000: Multiplier = 0.02
Case Is < 9000: Multiplier = 0.04
Case Is < 10000: Multiplier = 0.05
Case Is < 11000: Multiplier = 0.06
Case Is < 12000: Multiplier = 0.08
Case Is >= 12000: Multiplier = 0.1
End Select
For i = 224 To 264
Range("H" & i).Value = Range("E" & i).Value * Multiplier
Next i
I also need to calculate cells in column "I" where if E224:E264 is more than 10k but less than 11k, I want that cell in "I" to multiply cell E respectively by 19%. I would like to somehow set the range 224:264 so I don't have to change it in multiple places. Help?