Help with decimal half fraction

M

mikewild2000

A number of cells i use from time to time may have a half fraction a
.5, and what i am trying to do is:

If cell F16 = 2.5 then multiply it by 2, otherwise leave it as it is.

Also, if F16 is a fraction then i need to add "to 2" at then end.
Likewise, if it is not a fraction the i need to add "to 1" at the end.


The formula i have so far is:

=if (RIGHT(F16,2)*0.5,(FLOOR(F22*2,1)/2+(-D3)*2&" t
"&"2",Floor(F22*2,1)/2+(D3))&" to "&"1"

I believe the RIGHT part of the formula is incorrect

Any help will be appreciated
 
G

Guest

Mike

Try
=IF(INT(F16)<>F16,(FLOOR(F22*2,1)/2+(-D3))*2&" to "&"2",(FLOOR(F22*2,1)/2+(D3))&" to "&"1")

Tony

----- mikewild2000 > wrote: -----

A number of cells i use from time to time may have a half fraction as
.5, and what i am trying to do is:

If cell F16 = 2.5 then multiply it by 2, otherwise leave it as it is.

Also, if F16 is a fraction then i need to add "to 2" at then end.
Likewise, if it is not a fraction the i need to add "to 1" at the end.


The formula i have so far is:

=if (RIGHT(F16,2)*0.5,(FLOOR(F22*2,1)/2+(-D3)*2&" to
"&"2",Floor(F22*2,1)/2+(D3))&" to "&"1"

I believe the RIGHT part of the formula is incorrect

Any help will be appreciated.
 
M

mikewild2000

spot on - thank you very much.

I am now reading about the INT statement in Excel help, i need to kno
more about it.
.........

Ah, very clever, it is rounding down! Never thought of that
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top