Hello
I have a macro that will automatically run as i change the cell value from the drop down selection.
its working fine, but now i want to apply this to whole column. As well as it work only for each cell individually, like i change the value in B5 ,then only result changes in D5.
please help me for that.
i am sharing the macro code.
Module 1 :-
Sub risk()
If Range("c2").Value = Range("Paid") Then
Range("d2").Value = "=b2"
If Range("c2").Value = Range("Remaining") Then
Range("d2").Value = "enter amount"
End If
End Sub
and for running this automatically by selection drop down i use -
In Sheet1 :-
Sub Worksheet_change(ByVal target As Range)
If Not Intersect(target, Range("c2")) Is Nothing Then
Call risk
End If
End Sub
here is mini sheet-
I have a macro that will automatically run as i change the cell value from the drop down selection.
its working fine, but now i want to apply this to whole column. As well as it work only for each cell individually, like i change the value in B5 ,then only result changes in D5.
please help me for that.
i am sharing the macro code.
Module 1 :-
Sub risk()
If Range("c2").Value = Range("Paid") Then
Range("d2").Value = "=b2"
If Range("c2").Value = Range("Remaining") Then
Range("d2").Value = "enter amount"
End If
End Sub
and for running this automatically by selection drop down i use -
In Sheet1 :-
Sub Worksheet_change(ByVal target As Range)
If Not Intersect(target, Range("c2")) Is Nothing Then
Call risk
End If
End Sub
here is mini sheet-
paid.xlsm | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Drop-Down | |||||
2 | 500 | Remaining | enter amount | |||
3 | ||||||
4 | 300 | Paid | ||||
5 | 600 | Remaining | ||||
6 | ||||||
7 | ||||||
8 | ||||||
9 | ||||||
10 | ||||||
Risk |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
C2:C7 | List | Paid,Remaining |