Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting the number of characters in a cell. How? caliskier Excel Discussion (Misc queries) 3 January 12th 06 04:50 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Text in formula bar is not displaying in cell Mike Excel Discussion (Misc queries) 0 August 29th 05 09:47 PM
remove last three characters of cell mira Excel Discussion (Misc queries) 8 July 28th 05 12:06 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"