hello, please help!!!
briefly,i have to enter data in an excel worksheet,and after that, i have to cope everything and paste it in another program( AS/400 this is not important) ,and the problem is that the AS/400 needs to have specific number of characters in every column, what i want to do , is to write a function, or a small program in VBA so that i can identify the number of characters in every column..
1.going to data>validation>text length ... doesnt work, cause i want it to erase automatically what is beyond the length needed
2. the function LEFT(A1;10) for example is not working in my excel 2002, i don't know why, maybe if it works it would be great,but it seems that excel is not recognising it
3.in VBA
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
Target = Left(Target, 2)
End Sub
is working,but i when i paste more than one cell in more than one cell in the column 2 (in this example) it is giving me an error, moreover,i don't know how to write it in order to program many columns at the same time...
thanks for help
Bookmarks