Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
AHJuncti
 
Posts: n/a
Default Count Number of Characters in a cell?


Is there a way to check the number of characters that are in a cell, and
then if that number isn't what it is supposed to be add leading 0's till
it is the correct number?

We are getting some new accounts sent to us that use an 11 digit number
to represent the account number. Some of these have leading 0's in them
but excel loses them when sent over. So ideally I'd like to create
something that would look at the cell, count the characters and if it
is less than 11 add 0's to the front till it is 11 characters.

Ex: Account number 00123123123

It's sent to us and now looks like 123123123

I'd do the formula on the cell and get the original number back
00123123123

It's usually only missing 1 or 2 0's. It's very rare that the number
starts with 3 0's.

If anyone has any suggestions it's appreceated.

Thanks


--
AHJuncti
------------------------------------------------------------------------
AHJuncti's Profile: http://www.excelforum.com/member.php...fo&userid=4809
View this thread: http://www.excelforum.com/showthread...hreadid=379683

  #2   Report Post  
anilsolipuram
 
Posts: n/a
Default


There are many solution to your problem, one of them is

select the cells for which you want enforce 11 digit number, right
click-format cells- select custom- type in 0000000000#, click ok.


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=379683

  #3   Report Post  
AHJuncti
 
Posts: n/a
Default


Worked like a charm. Knew someone would have a solution.

Thanks


--
AHJuncti
------------------------------------------------------------------------
AHJuncti's Profile: http://www.excelforum.com/member.php...fo&userid=4809
View this thread: http://www.excelforum.com/showthread...hreadid=379683

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
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
Equation Referencing Row Number Stored in Cell Jim Hagan Excel Discussion (Misc queries) 1 April 13th 05 09:04 PM
fill or truncate to a certain number of characters in a cell Jan Buckley Excel Worksheet Functions 1 March 16th 05 04:46 PM
Count number of shaded cells Maddoktor Excel Discussion (Misc queries) 2 December 20th 04 09:35 PM
Formatting a cell as "text" in the number catagory. Ed Excel Worksheet Functions 3 December 7th 04 08:12 PM


All times are GMT +1. The time now is 09:09 PM.

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"