Well, this works, for what I did. Not sure if it's exactly what you
wanted though.
I made a cell, B2, which contained =COUNTA(A1:IV1) (Count the number of
non blank cells between A and IV (the last column))
That will only work if there are no blank cells between the start and
the end of your data. If there is, I'd use a Do->While ActiveCell<>B2
(not sure if that's the actual code) or similar.
Anyway, you've got the counter in B2, and all the long data (I copy
pasted 80 charachters into each cell) And then made a new VBA Module
that looked like this.
'general declarations
Dim cellscount
Dim cellcontents
Dim cellarea
Sub Trimmer()
Application.ScreenUpdating = False
cellscount = [A2]
cellscount = cellscount - 1
Cells(1, 1).Activate
cellcontents = ActiveCell.Value
ActiveCell.Value = Left(cellcontents, 40)
For cellarea = 0 To cellscount
ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate
cellcontents = ActiveCell.Value
ActiveCell.Value = Left(cellcontents, 40)
Next cellarea
Cells(1, 1).Activate
Beep
Application.ScreenUpdating = True
End Sub
If anybody has a better way of doing this, feel free. I'm as much
interested in more versatile code as the next person.
Hope it helps.
-Bob