Hi.
Hi.![]()
Private Sub Worksheet_Change(ByVal Target As Excel.Range)If Target.Column = 2 Then Call I_wish_it_was_only_in_Worksheet_Change_ Else Exit Sub End If End Sub
could someone help me adapt the code so that column "B", and "Crash," consider "Near-miss" and "Non-Compliance", like the "OR" of Excel, and the result happens in columns "T", "U", "V" and "W"?
tried the code below but is not working.
Cross-Post![]()
Sub I_wish_it_was_only_in_Worksheet_Change_() Dim i As Long, n As Long n = Range("B65536").End(xlUp).Row For i = 2 To n If Range("B" & i).Value = "" Then Range("T:T, U:U, V:V, W:W" & i).Value = "" ElseIf Range("B" & i).Value = "Crash" Or "Near-miss" Or "Non-Compliance" Then Range("T:T, U:U, V:V, W:W" & i).Value = "" Else Range("T:T, U:U, V:V, W:W" & i).Value = "NA" End If Next i End Sub
http://www.mrexcel.com/forum/excel-q...ra-result.html
Bookmarks