When any cell in Column J, Range( J4:J76 ) is clicked I need this revPrice in M3 cell, if Values in H is less than 90 & greater than 80 then I need to get the percentage of Product of Values H & M and subtract that with value in G
If H < 90 And H > 80 Then
revPrice = G - (H * M * 0.04)
ElseIf H < 81 And H > 65 Then
revPrice = G - (H * M * 0.06)
ElseIf H < 65 And H > 50 Then
revPrice = G - (H * M * 0.08)
ElseIf H < 50 And H > 35 Then
revPrice = G - (H * M * 0.1)
ElseIf H < 35 And H > 20 Then
revPrice = G - (H * M * 0.12)
ElseIf H < 20 And H > 10 Then
revPrice = G - (H * M * 0.15)
End If
& when any cell in Column D Range( D4:D76 ) is clicked I need this revPrice in M3 cell
If F < 90 And F > 80 Then
revPrice = G + (F * A * 0.04)
ElseIf F < 80 And F > 65 Then
revPrice = G + (F * A * 0.06)
ElseIf F < 65 And F > 50 Then
revPrice = G + (F * A * 0.08)
ElseIf F < 50 And F > 35 Then
revPrice = G + (F * A * 0.1)
ElseIf F < 35 And F > 20 Then
revPrice = G + (F * A * 0.12)
ElseIf F < 20 And F > 10 Then
revPrice = G + (F * A * 0.15)
End If
Can someone help me to code this in Selection Change Event of the Worksheet, attaching the file for your reference, I have highlighed mock work in Column N & O in Sheet "NIFTY"
Other codes in Selection Change Event as below should not be a hindrance in the above work
If Target.Column <> 4 And Target.Column <> 10 Then Range("A3,M3").ClearContents
Bookmarks