Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
limiting characters in a cell by formula
Hi,
I am trying to import some information into another software system from excel, unfortunatley in one particular field there is a limit to the amount of characters that can be entered, so when I try to import the file it's rejected. Is there a way I can limit the amount of characters in excel, for example the original cell might say "this can't be right" but I need a formula to limit the amount of characters to say 10 to bring it down to "this can't". does anyone know of a way to do this, I have a feeling there is a way via macros or VBA but I am not to flash at these. Cheers Campbell |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
limiting characters in a cell by formula
Campbell wrote: Hi, Is there a way I can limit the amount of characters in excel, for example the original cell might say "this can't be right" but I need a formula to limit the amount of characters to say 10 to bring it down to "this can't". Cheers Campbell Hi Campbell The formula you want is: =LEFT(A1,10) The vba you might want is: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub Target = Left(Target, 10) End Sub The macro checks the column to limit, in this case column A; amend it as necessary. Regards Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limiting the number of characters in a cell. How? | Excel Discussion (Misc queries) | |||
Match then lookup | Excel Worksheet Functions | |||
Text in formula bar is not displaying in cell | Excel Discussion (Misc queries) | |||
remove last three characters of cell | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions |