adding decimals into whole number

Hi,

I am using excel 2003
how can you add a 2 decimal number into the main number?

eg. 10.15 into 10+15?
csharp_learnerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cyberkiwiCommented:
So if A1 is 10.15, you want to get 10+15=25 as the answer?

=ROUND(A1,0)+INT((A1-ROUND(A1,0))*100)
0
cyberkiwiCommented:
Or

=ROUND(A1,0)+INT(MOD(A1*100,100))
0
AlanConsultantCommented:
Hi,

If you have 10.15 in A1 then use this:

=INT(A1)+((A1-(INT(A1)))*100)

Alan.
0
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

barry houdiniCommented:
If you have 10.15 in A2 try this formula in B2

=INT(A2)+MOD(A2,1)*100

regards, barry
0
AlanConsultantCommented:
That's the best one Barry - good thinking!

Alan.
0
cyberkiwiCommented:
For postering, because I messed up using ROUND instead of INT (even though it gets used in the 2nd part...)

if A1 is 10.15, and you want to get 10+15=25 as the answer..

=INT(A1)+INT(MOD(A1,1)*100)

10.159999 will also end up as 25
0
cyberkiwiCommented:
Sorry, I was testing Barry's formula and got mixed up, I meant to correct my 2nd one

=INT(A1)+INT(MOD(A1*100,100))
0
csharp_learnerAuthor Commented:
CAn there be a formula to do it when it is 1 decimal place?

Sorry that if i forgot to mention there are instances where it may be like

10.1 or 0.1
0
cyberkiwiCommented:
So if it is 10.1 -> 11? or 20?
And can it be 10.1456 -> 10 + 1456 = 1466?
0
cyberkiwiCommented:
If your number is in A1

=IF(A1=INT(A1),A1,INT(A1)+MID(A1,FIND(".",A1&".")+1,100))
0
AlanConsultantCommented:
But perhaps 10.1456 = 10+14.56 = 24.56 ?

There may be a secret algorithm ;->

Alan.
0
Rory ArchibaldCommented:
Variation on a theme:
=INT(A1)+SUBSTITUTE(MOD(A1,1),"0.","")
0
Rory ArchibaldCommented:
PS the above assumes your numbers are always positive.
0
cyberkiwiCommented:
Rory, I get

10.1      => 1E+15
10.62 => 6.2E+14
0
Rory ArchibaldCommented:
Ah, yes. Stupid bloody floating points. :)
0
Rory ArchibaldCommented:
=INT(A1)+SUBSTITUTE(TEXT(MOD(A1,1),"general"),".","")
should work I think, but is getting silly. ;)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rory ArchibaldCommented:
Or:
=INT(A1)+SUBSTITUTE(A1&".0",INT(A1)&".","")
0
cyberkiwiCommented:
That last one is very Barry-like.  Real good
0
Rory ArchibaldCommented:
csharp_learner,
As you got multiple working solutions - and before my post too - I think a points split would be fairer here.
Regards,
Rory
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.