Q:

Need to exclude a word (or number of characters) in my code

I am trying to create a Module that will format an excel spreadsheet for my team at work.  There is one column that will contain the word "CPT" and various CPT codes with descriptions.  
I need to delete all text (CPT description) after the 5 digit CPT code but alsp keep the word CPT in other cells. 
For example: Column S, Row 6 contains only the word "CPT"   (not in quotations)
Then Column S, Row 7 contains the text "99217 Observation Care Discharge"
This setup repeats several times throughout Column S.
I would like for Row 6 to stay the same as it is ("CPT") but in Row 7 i only want to keep "99217"
Unfortunately, this is not possible to do by hand as there are several people who will need this macro and our spreadsheets can have this wording repeated hundreds of times in this column with different CPT codes and descriptions. 
I have tried various If/Then statements, If/Then/Else
Sub CPTcolumn()
Dim celltxt As String
celltxt = ActiveSheet. Range("S6" & Rows. Count).End(xlUp).Text
Dim LR As Long, i As Long
LR = Range("S6" & Rows. Count).End(xlUp).Row

For i = 1 To LR
    If InStr(1, celltxt, "CPT") Then
Next i

Else
    With Range("S6" & i)
    .Value = Left(.Value, InStr(.Value, " "))
End With
Next i

End If
End Sub

When i try to run it I get Various "Compile Errors"

A:

I would do this differently. 
Given:

The cell to be modified will be the cell under a cell that contains CPT

in the algorithm below, we look for CPT all caps and only that contents.   Easily modified if that is not the case. 

Since you write " a five digit code", we need only extract the first five characters. 
IF you might have some cells that contain CPT where the cell underneath does not contain a CPT code, then we'd also have to check the contents of the cell beneath to see if it looked like a CPT code. 

So we just use the Range. Find method:
Sub CPT()
    Dim WS As Worksheet, R As Range, C As Range
    Dim sfirstAddress As String

Set WS = Worksheets("sheet4")
With WS.Cells
    Set R = .Find(what:="CPT", LookIn:=xlValues, lookat:=xlWhole, _
                    MatchCase:=True)
    If Not R Is Nothing Then
        sfirstAddress = R.Address
        Set C = R.Offset(1, 0)
        C.Value = Left(C.Value, 5)

        Do
            Set R = .FindNext(R)
            If Not R.Address = sfirstAddress Then
                Set C = R.Offset(1, 0)
                C.Value = Left(C.Value, 5)
            End If
        Loop Until R.Address = sfirstAddress
    End If
End With
End Sub

If this sequence is guaranteed to only be in Column S, we can change 
With WS.Cells

to With WS.Columns(19).Cells
and that might speed things up a bit. 
You may also speed things up by adding turning off ScreenUpdating and Calculation while this runs.