When I run my macro in Excel, to bring CSV data into Excel and run my calcs I get run time error 13. "Type mismatch"
I get it on this line: If MyLen > 4000 Then
It's due to #NAME? error that I get from the column with Notes (text field).
I need to insert "skip-that-error" into my Sub.
Can you please help?
Dim RemString, MyLen, NewString
Dim Rng, MyCell As Range
Set Rng = Range("G:G") 'Change range to suit
For Each MyCell In Rng
RemString = MyCell.Value
MyLen = Len(RemString)
If MyLen > 4000 Then
NewString = Left(RemString, 4000) 'Change value (length of string) to suit
MyCell.Value = NewString