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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]12345[/TD]
[TD="align: right"]32647[/TD]
[TD="align: right"]36143[/TD]
[TD="align: right"]41345[/TD]
[TD="align: right"]53261[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet4

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A3[/TH]
[TD="align: left"]{=MODE(--LEFT(A1:E1,1))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]

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,224,747
Messages
6,180,716
Members
452,995
Latest member
isldboy

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