Option Explicit
Sub foo()
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("Raw Data")
Set s2 = Sheets("SD")
Dim i As Long, lr As Long, lrS As Long
lr = s1.Range("E" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
For i = 8 To lr
lrS = s2.Range("A" & Rows.Count).End(xlUp).Row
If InStr(s1.Range("E" & i), "C400") > 0 Then
s2.Range("A" & lrS + 1) = s1.Range("A" & i)
s2.Range("B" & lrS + 1) = s1.Range("C" & i)
s2.Range("C" & lrS + 1) = s1.Range("D" & i) & "-DA3"
s2.Range("D" & lrS + 1) = s1.Range("I" & i) - s1.Range("N" & i)
s2.Range("E" & lrS + 1) = s1.Range("G" & i)
s2.Range("A" & lrS + 2) = s1.Range("A" & i)
s2.Range("B" & lrS + 2) = s1.Range("C" & i)
s2.Range("C" & lrS + 2) = s1.Range("D" & i) & "-NC3"
s2.Range("D" & lrS + 2) = s1.Range("K" & i) - s1.Range("M" & i)
s2.Range("E" & lrS + 2) = s1.Range("G" & i)
ElseIf InStr(s1.Range("E" & i), "n9000") > 0 Then
s2.Range("A" & lrS + 1) = s1.Range("A" & i)
s2.Range("B" & lrS + 1) = s1.Range("C" & i)
s2.Range("C" & lrS + 1) = s1.Range("D" & i) & "-DA3"
s2.Range("D" & lrS + 1) = s1.Range("I" & i) - s1.Range("N" & i)
s2.Range("E" & lrS + 1) = s1.Range("G" & i)
s2.Range("A" & lrS + 2) = s1.Range("A" & i)
s2.Range("B" & lrS + 2) = s1.Range("C" & i)
s2.Range("C" & lrS + 2) = s1.Range("D" & i) & "-NC3"
s2.Range("D" & lrS + 2) = s1.Range("K" & i) - s1.Range("M" & i)
s2.Range("E" & lrS + 2) = s1.Range("G" & i)
ElseIf InStr(s1.Range("E" & i), "q10000") > 0 Then
s2.Range("A" & lrS + 1) = s1.Range("A" & i)
s2.Range("B" & lrS + 1) = s1.Range("C" & i)
s2.Range("C" & lrS + 1) = s1.Range("D" & i) & "-DA3"
s2.Range("D" & lrS + 1) = s1.Range("I" & i) - s1.Range("N" & i)
s2.Range("E" & lrS + 1) = s1.Range("G" & i)
s2.Range("A" & lrS + 2) = s1.Range("A" & i)
s2.Range("B" & lrS + 2) = s1.Range("C" & i)
s2.Range("C" & lrS + 2) = s1.Range("D" & i) & "-NC3"
s2.Range("D" & lrS + 2) = s1.Range("K" & i) - s1.Range("M" & i)
s2.Range("E" & lrS + 2) = s1.Range("G" & i)
End If
Next i
Application.ScreenUpdating = True
End Sub