General division question!

N

Neo1

Hello I have a slight problem, I want to do the following:

A1 has 25 , B1 has 55 and in C1 i put the formula =B1/A1 which i
get 2.2, how can i put in C1 2 and then on C2 0.2 ...which is the
remainder?


Thanks for your time
From John
 
R

Ron Rosenfeld

Hello I have a slight problem, I want to do the following:

A1 has 25 , B1 has 55 and in C1 i put the formula =B1/A1 which i
get 2.2, how can i put in C1 2 and then on C2 0.2 ...which is the
remainder?


Thanks for your time
From John

C1: =INT(B1/A1)
D1: =MOD(B1/A1,1)

or =B1/A1-INT(B1/A1)


--ron
 
R

Ron Coderre

Try this:

C1: =INT(B1/A1)
C2: =MOD(B1/A1,1)

Does that give you something to work with?

Regards,
Ron
 
N

Neo1

There's a problem...when i then try to multiply C2 by B1 which I'm
meant to get 11 i get 9.166667....

How can i solve this

Thanks
From John
 
P

Pete_UK

I get 11 when I try it. Just make sure you have the values 25 and 55 in
A1 and B1 and not some fractional values which round to those numbers.
Check that you've entered the formula correctly.

Pete
 
R

Ron Coderre

From what you described, the values in A1 and B1 must *look like* 25 and
55, but they must actually be other values.

You can check by trying this:
Select A1
Press [F2] then press [F9]
Look at the number in the formula bar.
If it's not 25, that's part of your problem.
Press [Esc] get out of edit mode.

Select B1
Do the same procedure .

Does that help?

Regards,
Ron
 
D

DJH

Neo1 said:
Hello I have a slight problem, I want to do the following:

A1 has 25 , B1 has 55 and in C1 i put the formula =B1/A1 which i
get 2.2, how can i put in C1 2 and then on C2 0.2 ...which is the
remainder?


Thanks for your time
From John
 
N

Neo1

The thing is in my spreadsheet i have:

A1 "80" B1 "6" C1 "55" D1 =ROUND(C1/B1,0)

D2 =C1/B1 - D1



And then in E1 I put =D2*C1

And i dont get 11 i get 9.166667 for no reason

Any help please
Thanks
From John
 
S

Sandy Mann

John,

What you are saying does not make any sense, at least to me.

C1/B1 = 55/6 = 9 1/6

D2 therefore is 1/6

D2 x C1 = 1/6 x 55 = 9 1/6

Which is what you are getting.

How do you reckon that you should get 11?
--
HTH

Sandy
[email protected]
[email protected] with @tiscali.co.uk
 
N

Neo1

yea thats right...exactly silly mistake i was using so many numbers and
rouding many things that i didnt realise that sorry
now what can I do to like if i have 50 divided by 4 i get 12.5 how can
i round it off to 12 not to 13 for all the divisions i make that which
gives me something point 0.5 i want it to go not to the number such as
13 but 12?

Thanks
From John
 
R

Ron Rosenfeld

yea thats right...exactly silly mistake i was using so many numbers and
rouding many things that i didnt realise that sorry
now what can I do to like if i have 50 divided by 4 i get 12.5 how can
i round it off to 12 not to 13 for all the divisions i make that which
gives me something point 0.5 i want it to go not to the number such as
13 but 12?

Thanks
From John


Did you try my solution?


--ron
 
R

Ron Coderre

The problem (in this case) with the ROUND function is that
it....rounds!

Your situation should use the INT or TRUNC functions to truncate the
results and the MOD function to get division remainders.

Examplse
50/4 = 12.5

ROUND(50/4,0) = 13
INT(50/4) = 12

MOD(50/4,1) = 0.5

I hope that helps.

Regards,
Ron
 
N

Neo1

yea the INT forumla did but then to get the remainder the MOD didnt wor
so what i did is =50/4 - the cell that has the INT formula

Thanks
From Joh
 
R

Ron Rosenfeld

yea the INT forumla did but then to get the remainder the MOD didnt work
so what i did is =50/4 - the cell that has the INT formula

Thanks
From John

Yes, that was my second suggestion in that post.

I wonder why the MOD formula didn't work, though.
--ron
 
Top