#NUM! error when number is 13 digits or more

memrani

New Member
Joined
Oct 3, 2011
Messages
2
The following formula works fine as long as the integer in cell A1 has 12 digits or less. I get a #NUM! error otherwise (13 or more digits).
Any help is appreciated.

=MOD((A1-MOD(A1,POWER(10,ROW(A2)-2)))/POWER(10,ROW(A2)-2),10)
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Can you provide some example values/results desired? Perhaps we can offer a different method.
 
Upvote 0
I'm not quite sure what you are trying to do but.....

.....MOD function has some limitations when used with large numbers - try this version with FLOOR and RIGHT instead

=RIGHT(FLOOR(A1,POWER(10,ROW(A2)-2))/POWER(10,ROW(A2)-2))+0
 
Upvote 0
Here's a shorter version that I think will do the same thing:

=IF(ROW(A1)<=LEN(A1),LEFT(RIGHT(A1,ROW(A1)))+0,0)
 
Upvote 0
Excel Workbook
AB
11234567890123455
21234567890123454
31234567890123453
41234567890123452
51234567890123451
61234567890123450
71234567890123459
81234567890123458
91234567890123457
101234567890123456
111234567890123455
121234567890123454
131234567890123453
141234567890123452
151234567890123451
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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