Related:
- Worksheet calculate event
- Transfer data from one excel worksheet to another automatically - Guide
- How to calculate position in excel ✓ - Office Software Forum
- Activeworkbook.worksheets current worksheet ✓ - Excel Forum
- How to calculate vat in excel - Guide
- How to calculate position (1st,2nd,3rd) in excel....? - Excel Forum
2 replies
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
Jan 7, 2010 at 08:33 PM
Jan 7, 2010 at 08:33 PM
In the absence of the data it is difficult to say. however try this modified event code and confirm whether you succeed .
Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'If Target.Address = "$I2:$J60" Then If Target.Column <> Range("I1").Column And Target.Column <> Range("J1").Column Then Exit Sub ElseIf Target.Row = 1 Or Target.Row > 160 Then Exit Sub Else Application.Run "CalRiskScore" End If End Sub
THanks for the reply venkat926, however the SelectChange event code did not work. There were no errors. The sub did not automate the running of the macro.
The data "entered" into Columns I and J are text choices [verylow,low,medium,high,veryhigh]. The macro that I want to call from the event sub is in a standard module. The macro runs through a 5X5 matrix comparing results entered , assigning each I and each J qualitative combination a decimal value, multiplies them together and places the resulting percentage into column K.
Perhaps I need to use the Calculate private sub event for this to work?
The data "entered" into Columns I and J are text choices [verylow,low,medium,high,veryhigh]. The macro that I want to call from the event sub is in a standard module. The macro runs through a 5X5 matrix comparing results entered , assigning each I and each J qualitative combination a decimal value, multiplies them together and places the resulting percentage into column K.
Perhaps I need to use the Calculate private sub event for this to work?