Something like this.
Sub TC()
Dim FoundCell As Range
Dim LastCell As Range
Dim FirstAddr As String
Dim WhatColumn As String
Dim iCount As Long
If Selection.Columns.Count > 1 Then Exit Sub
WhatColumn = Mid(ActiveCell.Address, 2, InStr(2, ActiveCell.Address, "$") - InStr(1, ActiveCell.Address, "$") - 1)
With Range(WhatColumn & ":" & WhatColumn)
Set LastCell = .Cells(.Cells.Count)
End With
Set FoundCell = Range(WhatColumn & ":" & WhatColumn).Find(What:="TC", After:=LastCell)
If Not FoundCell Is Nothing Then
FirstAddr = FoundCell.Address
End If
Do Until FoundCell Is Nothing
iCount = iCount + 1
FoundCell.Value = FoundCell.Value & iCount
Set FoundCell = Range(WhatColumn & ":" & WhatColumn).FindNext(After:=FoundCell)
If FoundCell.Address = FirstAddr Then
Exit Do
End If
Loop
End Sub
Bookmarks