Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
beefycj5
 
Posts: n/a
Default Counting the number of letters in a cell


Can Excel count the numbers of letters in a cell that has mixed letters
and numbers? Can you restrict =LEN to only letters (or only numbers)?

IE - ABC123
# of letters = 3

Thanks,
Adam


--
beefycj5
------------------------------------------------------------------------
beefycj5's Profile: http://www.excelforum.com/member.php...o&userid=16353
View this thread: http://www.excelforum.com/showthread...hreadid=375769

  #2   Report Post  
MartinShort
 
Posts: n/a
Default


Are they always in the same format Adam? ie 3 letters, 3 numbers. If
they are try a combination of the LEFT and LEN functions.

ie *=LEN(LEFT(A1))* etc.

If the pattern is irregular, yes you can do it, but you would need to
write a small macro. To help you, we would also need more precise
rules. ie What would you want to extract if the cell contained
A23BGF44?

Martin


--
MartinShort

Software Tester
------------------------------------------------------------------------
MartinShort's Profile: http://www.excelforum.com/member.php...o&userid=22034
View this thread: http://www.excelforum.com/showthread...hreadid=375769

  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default


See if this works for you:

=LEN(A1)-SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6,7,8,9},"")))

It should accommodate any combination of text and numbers.

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=375769

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
Copy a number from one cell to another depending on first number marcia driscoll Excel Worksheet Functions 3 May 3rd 05 08:30 PM
how to stop repeating a number in worksheet(e.g. cell A1 is 6655 . Mushtaque Parker Excel Discussion (Misc queries) 0 April 24th 05 01:04 PM
Equation Referencing Row Number Stored in Cell Jim Hagan Excel Discussion (Misc queries) 1 April 13th 05 09:04 PM
excel - numbers as text Thuferhawat New Users to Excel 12 January 24th 05 09:29 PM
#VALUE in cell but pop up function box show right number Ted Dalton Excel Discussion (Misc queries) 1 December 14th 04 03:15 PM


All times are GMT +1. The time now is 09:36 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"