ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Morning,
I have an issue on one worksheet & trying to find the reason why.
Please could you explain what the supplied code actually does.
Please could you then advise another way to write it.
Thanks
I have an issue on one worksheet & trying to find the reason why.
Please could you explain what the supplied code actually does.
Please could you then advise another way to write it.
Thanks
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim C As Range, d As Range
Set d = Intersect(Target, Range("G13:O17", "G27:O42"))
If d Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each C In d
If C.Column <> 14 Then
If Not C.HasFormula Then C = UCase(C)
End If
Next
If Intersect(Target, Range("G13")) Is Nothing Then Exit Sub
Dim rName As Range, srcWS As Worksheet
Set srcWS = Sheets("DATABASE")
Set rName = srcWS.Range("A6:A" & srcWS.Cells(srcWS.Rows.Count, 1).End(xlUp).Row).Find(Target, LookIn:=xlValues, lookat:=xlWhole)
If Not rName Is Nothing Then
Range("N15") = srcWS.Range("B" & rName.Row)
Range("N14") = srcWS.Range("D" & rName.Row)
Range("N16") = srcWS.Range("L" & rName.Row)
Range("N17") = srcWS.Range("W" & rName.Row)
Range("G14") = srcWS.Range("R" & rName.Row)
Range("G15") = srcWS.Range("S" & rName.Row)
Range("G16") = srcWS.Range("T" & rName.Row)
Range("G17") = srcWS.Range("U" & rName.Row)
Range("G18") = srcWS.Range("V" & rName.Row)
Application.EnableEvents = True
End If
End Sub
Last edited: