Return MODE of first digits only, from an array of numbers

L

Legacy 287389

Guest
Hi good people,

please help me with a formula that will return the MODE of only the first digits of an array of numbers, for example,
if I have in row 1, columns A-E for example:

12345, 32647, 36143, 41345, 53261,

I would like "3" returned. Thank you kindly...
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try

Excel 2010
ABCDE
11234532647361434134553261
2
33
Sheet4
Cell Formulas
RangeFormula
A3{=MODE(--LEFT(A1:E1,1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Try
Excel 2010
ABCDE
11234532647361434134553261
2
33

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
A3{=MODE(--LEFT(A1:E1,1))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

hi Scott T,

actually, I thanked you before I tried it...your formula returnes the correct value, however, a mistake on my part, I forgot to mention that some rows have a lot of blank cells...for those rows the formula returnes a VALUE error..can it be changed to ignore blank cells maybe?
 
Upvote 0
Try

If no number is repeated mode returns the N/A error. This will return blank.


Excel 2010
ABCDEFG
112345326473614341345532613
212345426473614341345532614
3123777899744397767
41237778997443767
5123452264736143412359999 
Sheet4
Cell Formulas
RangeFormula
G1{=IFERROR(MODE(IFERROR(--LEFT(A1:E1,1),"0")),"")}
G2{=IFERROR(MODE(IFERROR(--LEFT(A2:E2,1),"0")),"")}
G3{=IFERROR(MODE(IFERROR(--LEFT(A3:E3,1),"0")),"")}
G4{=IFERROR(MODE(IFERROR(--LEFT(A4:E4,1),"0")),"")}
G5{=IFERROR(MODE(IFERROR(--LEFT(A5:E5,1),"0")),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,381
Messages
6,124,614
Members
449,175
Latest member
Anniewonder

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