count based the number of digits

stratis

Board Regular
Joined
Dec 10, 2012
Messages
65
Hallo,

I' m trying to find a sollution to the following problem.
I have a collumn with numbers (in the followin example collumn "Code"), which their lenght vary (from 2 to 10 digits). In another collumn (Collumn "Result from the formula") I would like to have a formula that will count the times that the number in each row appears to the collumn "Code" (the formula should count based on the digits that each numbers has). For example in collumn "Code" you may find the data and in collumn "Result from the formula" you may find what I want to succeed:

CodeResult from the formula
7461
7471
7482
74821
7411
75001
75021
75071
75081
75091
756
85000000001
20400900021

<tbody>
</tbody>

Are there any suggestions?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi,

You can try the following formula in cell B2:

=SUMPRODUCT( --(ISNUMBER(FIND(A2;$A$2:$A$14))))

Then paste it to to the below cells.

Cheers,
Rick
 
Upvote 0
You can also use the array formula shown. It should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formula can then be copied down.

Excel Workbook
AB
1CodeResult
27461
37471
47482
574821
67411
775001
875021
975071
1075081
1175091
12756
1385000000001
1420400900021
Count
 
Upvote 0
You can also use the array formula shown. It should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formula can then be copied down.

Count

AB
1CodeResult
27461
37471
47482
574821
67411
775001
875021
975071
1075081
1175091
12756
1385000000001
1420400900021

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B2{=COUNT(FIND(A2,A$2:A$14))}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Thank you very much!!!
It really works perfect!!!
 
Upvote 0
Thank you very much!!!
It really works perfect!!!
You are very welcome.
Just pointing out though that mine was just an alternative - Rickmaurinus' suggestion should also work for you.
 
Upvote 0

Forum statistics

Threads
1,215,129
Messages
6,123,218
Members
449,091
Latest member
jeremy_bp001

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