Count # of Digits in a CEll

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,519
Office Version
  1. 2016
Platform
  1. Windows
Hello To All,

Is there any formula which can count the number of digits in a cell - whether the cell is a manually entered value or a formula result.

For Example

Cell Value = 568793
# of Digits Are (6)

Awaiting reply.

Best Regards,

Humayun Rayani
 
Hello Humayun,

For unique digits try:

=IF(ISERR(FIND(0,A1,1))<>ISERR(FIND(0,B2,1)),0,)&IF(ISERR(FIND(1,A1,1))<>ISERR(FIND(1,B2,1)),1,)&IF(ISERR(FIND(2,A1,1))<>ISERR(FIND(2,B2,1)),2,)&IF(ISERR(FIND(3,A1,1))<>ISERR(FIND(3,B2,1)),3,)&IF(ISERR(FIND(4,A1,1))<>ISERR(FIND(4,B2,1)),4,)&IF(ISERR(FIND(5,A1,1))<>ISERR(FIND(5,B2,1)),5,)&IF(ISERR(FIND(6,A1,1))<>ISERR(FIND(6,B2,1)),6,)&IF(ISERR(FIND(7,A1,1))<>ISERR(FIND(7,B2,1)),7,)&IF(ISERR(FIND(8,A1,1))<>ISERR(FIND(8,B2,1)),8,)&IF(ISERR(FIND(9,A1,1))<>ISERR(FIND(9,B2,1)),9,)

This compares the values in cells A1 , B1

Also here is slightly modified Matching digits:

=IF(ISERR(FIND(0,A1,1)=FIND(0,B2,1)),,0)&IF(ISERR(FIND(1,A1,1)=FIND(1,B2,1)),,1)&IF(ISERR(FIND(2,A1,1)=FIND(2,B2,1)),,2)&IF(ISERR(FIND(3,A1,1)=FIND(3,B2,1)),,3)&IF(ISERR(FIND(4,A1,1)=FIND(4,B2,1)),,4)&IF(ISERR(FIND(5,A1,1)=FIND(5,B2,1)),,5)&IF(ISERR(FIND(6,A1,1)=FIND(6,B2,1)),,6)&IF(ISERR(FIND(7,A1,1)=FIND(7,B2,1)),,7)&IF(ISERR(FIND(8,A1,1)=FIND(8,B2,1)),,8)&IF(ISERR(FIND(9,A1,1)=FIND(9,B2,1)),,9)
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
hello repairman615

just waite a few minutes - i will let you know shortly.
 
Upvote 0
This is for the UNIQUE DIGITS

Code:
This compares the values in cells A1 , B1

Dear repairman615 the formula contains values in B2 - not in B1
Just to let you know.

ITS WORKING PERFECT... THANKS

Now i am trying the Modified formula of matching digits
 
Upvote 0
brother Both are 100% OK

pls tell me should i use the modified formula for matching digits or the previous one?
 
Upvote 0
brother next time has just arrived :)

there are few more things i want to ask you
can i go ahead?

i hope i am not getting on your nerves
 
Upvote 0
Don't feel as such, I am here to help and I do enjoy learning new things and helping you.

Honestly, I have learned more about excel by helping others here than I would have on my own or asking questions here.

However, I do think that having many different questions in one thread would make it harder for others to find the solutions if they had similar questions. They see this threads title as "count digits" and do not know that within this is also unique digits, matching digits and missing digits.

I am only thinking of others, start another thread and I will offer all the help I can and would enjoy another challange.

Jeff
 
Upvote 0
thanks jeff

i guess you are right

i should have realised it before..

pls see my new thread - i am gonna post it in 2 minutes

THREAD > Repeated Digits in a CELL
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,633
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top