The code that is not working for me is the second one. I want to be able to input the value ms into the cell that is doubleclicked in the range F6:F38. What am I doing incorrect? Is it because there are two codes that use Target?

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

    If Intersect(Target, Range("C6:E38")) Is Nothing Then Exit Sub
    Cancel = True
    If Target.Value <> "" Then
        With Target
            .Cells(emptyRow + 1, 20).Value = "1"
        End With
    End If

'code that doesn't work below
If Intersect(Target, Range("F6:F38")) Is Nothing Then Exit Sub
    Cancel = True
    
    If Target.Value = "" Then
        With Target
            .Cells(emptyRow, 6).Value = "ms"
        End With
    End If
    
End Sub