Excel 2106.
Setup of Worksheet:
Column F (starts from F10), you can choose the option “Closed” and “Cancelled”
Wat I want:
When the option “closed” or “Cancelled” is selected (example:F10). I want the following information to be filled in:
In Column M (M10) the date of today.
In Column AK (AK 10) and AL (AL 10) the text: Closed
In Column AQ (AQ10) and AR (AR10) the number: 100
I have the following macro, where the date is entered in column “M”, but I do not know how to add the other information automatically.
Can someone help me please?
Setup of Worksheet:
Column F (starts from F10), you can choose the option “Closed” and “Cancelled”
Wat I want:
When the option “closed” or “Cancelled” is selected (example:F10). I want the following information to be filled in:
In Column M (M10) the date of today.
In Column AK (AK 10) and AL (AL 10) the text: Closed
In Column AQ (AQ10) and AR (AR10) the number: 100
I have the following macro, where the date is entered in column “M”, but I do not know how to add the other information automatically.
Can someone help me please?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lr As Long
Dim trow As Long
lr = Cells(Rows.Count, "F").End(xlUp).Row
trow = Target.Row
If Not Intersect(Target, Range("F10:F" & lr)) Is Nothing And (UCase(Range("F" & trow)) = "CLOSED" Or UCase(Range("F" & trow)) = "CANCELLED") Then
Range("M" & trow) = Date
End If
End Sub