This macro will highlight a cell yellow if it is over the 30 Characters. This identifies what data will be truncated. Change the col variable, currently it is set to 3, this would be column C. The macro also starts on the activecell, so highlight the row you want the macro to begin.
Sub scan() Dim i As Long Dim s As Long Dim o As Long Dim col As Long Dim tgt As Long tgt = 30 col = 3 s = ActiveCell.Row For i = ActiveCell.Row To Rows.Count If Len(Cells(i, col).Value) > tgt Then Cells(i, col).Interior.ColorIndex = 6 ActiveCell.Offset(o, 0).Select End If Next i End Sub
Results:
Easy peasy.
ReplyDelete