Are you talking about this functionality for every cell on the worksheet? If
so, right click the tab at the bottom of the worksheet, select View Code
from the popup menu and copy paste the code below into the code window that
appeared...
'************* START OF CODE *************
Dim LastColumn As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If LastColumn > 0 Then
Application.ScreenUpdating = False
Columns(LastColumn).AutoFit
Application.ScreenUpdating = True
End If
LastColumn = Target.Column
End Sub
'************* END OF CODE *************
If you do not want this functionality for the whole sheet, then tell us for
what cells you do want it for.