Retrieving specific numbers from a decimal number

Eggplant2016

New Member
Joined
Jan 20, 2019
Messages
14
I have 4 cells that contribute to a total number.
Cells G24, N24, G32, N32. These cells currently sum a range of numbers from the 5 cells above them respectively.
The total number that these 4 cells add up to can be anywhere from an example number such as "1205.25" to something basic like "50"

Cells AJ6:AR6 are individual cells with AJ6 representing the hundred thousands all the way down to AR6 which represents the hundredths.

I need cell AR6 to take the sum of cells G24, N24, G32, N32 and only take the "hundredths" number. AQ6 will do the same but only take the tenths, AP6 will do the same and only take the ones, etc all the way to AJ6.

Is this possible??

Thank you so much for the help!
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Re: Retrieving specific numbers from a decimaled number

I think this is what you want:

=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:A1)-COLUMN($A$1)+1,1)+0,"")

Copy across.


Excel 2010
GHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQAR
23
241202.251120525   
25
26
27
28
29
30
31
3211
Sheet1
Cell Formulas
RangeFormula
AJ24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:A1)-COLUMN($A$1)+1,1)+0,"")
AK24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:B1)-COLUMN($A$1)+1,1)+0,"")
AL24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:C1)-COLUMN($A$1)+1,1)+0,"")
AM24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:D1)-COLUMN($A$1)+1,1)+0,"")
AN24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:E1)-COLUMN($A$1)+1,1)+0,"")
AO24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:F1)-COLUMN($A$1)+1,1)+0,"")
AP24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:G1)-COLUMN($A$1)+1,1)+0,"")
AQ24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:H1)-COLUMN($A$1)+1,1)+0,"")
AR24=IFERROR(MID(SUM(SUBSTITUTE(SUM($G24,$G32,$N24,$N32),".","")),COLUMNS($A$1:I1)-COLUMN($A$1)+1,1)+0,"")
 
Upvote 0
Re: Retrieving specific numbers from a decimaled number

It seems that what is happening is that when the number is not large enough, i.e "125,000.25" , then it is not populating the correct cells with the correct numbers.


For example if the sum of G24+N24+G32+N32= 12.50, I would like the cells to show this:

AJ6 AK6 AL6 AM6 AN6 AO6 AP6 AQ6 AR6
0 0 0 0 0 1 2 5 0

But if the sum of G24+N24+32+N32=12500.50, I would like the cells to show this:

AJ6 AK6 AL6 AM6 AN6 AO6 AP6 AQ6 AR6
0 0 1 2 5 0 0 5 0

Thanks for helping! Sorry if I didn't explain properly the first time
 
Last edited:
Upvote 0
Re: Retrieving specific numbers from a decimaled number

In AJ24:
=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:A1)-COLUMN($A$1)+1,1)

Copy across.


Excel 2010
GHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQAR
249.51000001250
25
26
27
28
29
30
31
3211
33
Sheet1
Cell Formulas
RangeFormula
AJ24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:A1)-COLUMN($A$1)+1,1)
AK24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:B1)-COLUMN($A$1)+1,1)
AL24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:C1)-COLUMN($A$1)+1,1)
AM24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:D1)-COLUMN($A$1)+1,1)
AN24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:E1)-COLUMN($A$1)+1,1)
AO24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:F1)-COLUMN($A$1)+1,1)
AP24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:G1)-COLUMN($A$1)+1,1)
AQ24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:H1)-COLUMN($A$1)+1,1)
AR24=MID(TEXT(SUBSTITUTE(TEXT(SUM($G24,$G32,$N24,$N32),"0.00"),".",""),"000000000"),COLUMNS($A$1:I1)-COLUMN($A$1)+1,1)
 
Upvote 0
Re: Retrieving specific numbers from a decimaled number

Another option:

=MOD(INT(($G24+$G32+$N24+$N32)/10^(7-COLUMNS($AJ24:AJ24))),10)

Put in AJ24 and drag to the right.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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