Hi,
I am trying to multiply the values in column H with the value's (100% +values in column I) and divide by 100%. Basically (H*(100%+I)/100%). I have the below code however its giving me type Mismatch error. can you please help
I am trying to multiply the values in column H with the value's (100% +values in column I) and divide by 100%. Basically (H*(100%+I)/100%). I have the below code however its giving me type Mismatch error. can you please help
Code:
Dim LastRow As Long
Dim X As Double, Y As Double
Dim cl As Range
Dim rng As Range
LastRow = Cells(Rows.Count, "H").End(xlUp).Row
X = Evaluate("H2:H" & LastRow & "*100%")
Y = Evaluate("I2:I" & LastRow & "+100%")
Set rng = Range("T2:T" & LastRow)
For Each cl In rng
cl.Value = X / Y
Next cl
End Sub