Find which digits are used in 10 digit numbers and count which number is used how many times in Excel

rahulbuddy

New Member
Joined
Nov 14, 2022
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
Hi All,

Apologies if this has been asked before but I was not able to find any other question relevant to my concern.
Need your kind help in one of my Excel projects where I have been given thousands of 10-digit numbers and I have to find out which specific digits are used along with which specific digit is used and how many times it has been used within that 10-digit number.

Attaching the workbook for your reference. Any help is highly appreciated.

workbook.png


Here is mini sheet,

sample-workbook.xlsx
ABCDEFGHIJKLMNO
1Sr. No.Number (it will be 10 digit)All digits used number (out of total 10 digits) 0's used 1's used2's used3's used4's used5's used6's used7's used8's used9's usedSum (Should always be 10)
2199 11 5 666 119156040001300210
328745614447874561010041121010
4377441238947412389011130021110
548845964555845960
6541217456880
7611448 597 310
87237 49651 2 80
9821 45 78 44 110
109896 574 56210
11100
12
13
14Please noteThe numbers in B coloums are compulsarily 10 digits only, but it may have spaces in between them like '23 55 444 111' or '666 222 0101' or '66 22 11 01 22' or '565 565 1212' like this
15
16
17
18The C coloum should only contains how many unique digits are being used in column B
19
20
Sheet1
Cell Formulas
RangeFormula
N2:N11N2=SUM(D2:M2)


Thanks and Regards,
Rahul.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
you posted on Welcome to Chandoo.org - Learn Excel, Charting Online where i answered

i added an extra row with 0-9 in
but could use LEFT() - see below

sample-workbook-etaf.xlsx
ABCDEFGHIJKLMN
1Sr. No.Number (it will be 10 digit)All digits used number (out of total 10 digits) 0's used 1's used2's used3's used4's used5's used6's used7's used8's used9's usedSum (Should always be 10)
2199 11 5 666 119156040001300210
328745614447874561010041121010
4377441238947412389011130021110
54884596455584596000024102110
654121745688021021112010
7611448 597 31030121011110
87237 49651 2 8012111111110
9821 45 78 44 11031031011010
109896 574 5621011012211110
111000000000000
Sheet1
Cell Formulas
RangeFormula
D2:M11D2=LEN($B2)-LEN(SUBSTITUTE($B2,LEFT(D$1,1),""))
N2:N11N2=SUM(D2:M2)


sample-workbook-etaf.xlsx
ABCDEFGHIJKLMN
1Sr. No.Number (it will be 10 digit)All digits used number (out of total 10 digits) 0's used 1's used2's used3's used4's used5's used6's used7's used8's used9's usedSum (Should always be 10)
20123456789
3199 11 5 666 119156040001300210
428745614447874561010041121010
5377441238947412389011130021110
64884596455584596000024102110
754121745688021021112010
8611448 597 31030121011110
97237 49651 2 8012111111110
10821 45 78 44 11031031011010
119896 574 5621011012211110
121000000000000
Sheet1
Cell Formulas
RangeFormula
D3:M12D3=LEN($B3)-LEN(SUBSTITUTE($B3,D$2,""))
N3:N12N3=SUM(D3:M3)
 
Upvote 1
Try:
varios 21jun2023.xlsm
ABCDEFGHIJKLMN
1Sr. No.Number (it will be 10 digit)All digits used number (out of total 10 digits) 0's used 1's used2's used3's used4's used5's used6's used7's used8's used9's usedSum (Should always be 10)
2199 11 5 666 119156040001300210
328745614447874561010041121010
4377441238947412389011130021110
54884596455584596000024102110
6541217456884127568021021112010
7611448 597 311485973030121011110
87237 49651 2 8237496518012111111110
9821 45 78 44 11214578031031011010
109896 574 562189657421011012211110
111012345678901234567890111111111110
Hoja1
Cell Formulas
RangeFormula
D2:M11D2=LEN($B2)-LEN(SUBSTITUTE($B2,COLUMNS($D$1:D$1)-1,""))
N2:N11N2=SUM(D2:M2)


In cell C2 and copy down:
Excel Formula:
=SUBSTITUTE(TEXTJOIN("",, UNIQUE(MID(B2,SEQUENCE(LEN(B2)),1)))," ","")
 
Upvote 1
Solution
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Find which digits are used in 10 digit numbers and count which number is used how many times in Excel
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Find which digits are used in 10 digit numbers and count which number is used how many times in Excel
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Hello,
Apologies for that. I am completely new to the forums and was in a hurry to submit my assignments before the deadline and wanted help as soon as possible, that was the only intention.
I will make sure that I comply with the forum rules in coming future.

How can I mark this forum as SOLVED as I have got what I wanted? Or how can I stop the replies?

Thanks & Regards
Rahul.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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