Question : Formula, Function or Macro that will eliminate the last 6 characters from a cell value

I have a column with as many as 3000 entries, some of which have the string " (OLD)" at the end. For example, G9 might be "E0718", G10 = "E2150 (OLD)", and G11="367". I can get the desired results with the formula below, but I wouldn't want 50 of these in a workbook let alone 3,000.
What's the most economical way to do this?

Thanks,
John
Code Snippet:
1:
=IF(RIGHT(VLOOKUP(F10,'\\taus-inas3\toledo_share\Depts\css\A_ILS & Reliability\Reliability\1-CURRENT\Monthly Flight Hours\[Copy of t_FH.xls]t_FH'!E:G,2,0),1)=")",LEFT(VLOOKUP(F10,'\\taus-inas3\toledo_share\Depts\css\A_ILS & Reliability\Reliability\1-CURRENT\Monthly Flight Hours\[Copy of t_FH.xls]t_FH'!E:G,2,0),(LEN(VLOOKUP(F10,'\\taus-inas3\toledo_share\Depts\css\A_ILS & Reliability\Reliability\1-CURRENT\Monthly Flight Hours\[Copy of t_FH.xls]t_FH'!E:G,2,0))-FIND(" ",VLOOKUP(F10,'\\taus-inas3\toledo_share\Depts\css\A_ILS & Reliability\Reliability\1-CURRENT\Monthly Flight Hours\[Copy of t_FH.xls]t_FH'!E:G,2,0),1))),VLOOKUP(F10,'\\taus-inas3\toledo_share\Depts\css\A_ILS & Reliability\Reliability\1-CURRENT\Monthly Flight Hours\[Copy of t_FH.xls]t_FH'!E:G,2,0))

Answer : Formula, Function or Macro that will eliminate the last 6 characters from a cell value

Here's a macro that will change the cell values to remove " (OLD)". Modify as needed for range & value.

Tim

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Public Sub Cleanup()
    
    Dim myRange As Range
    Dim c As Range
    
    Set myRange = Worksheets("Sheet1").Range("A:A")
    For Each c In myRange.Cells
    If Right(c, 6) = " (OLD)" Then
        c.Value = Left(c, Len(c) - 6)
    End If
    Next
End Sub
Random Solutions  
 
programming4us programming4us