I have a range D15:V15 in which only one cell might contain a value. I would like to copy the cell that contains a value to the cell O7 each time there is a change on that sheet. This formula below shows the expected value but keeps crashing after displaying the value. Could someone please help me identify what may be the cause.
Here is my code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim SrchRng As Range, cel As Range
Set SrchRng = Range("D15:V15")
For Each cel In SrchRng
If cel.Value <> "" Then
'cel.Offset(-8, 11).Value = cel.Value
Range("O7").Value = cel.Value
End If
Next cel