Boat Drinks  

Go Back   Boat Drinks > General > Computer and Consoles

Reply
 
Thread Tools Display Modes
Old 18-11-2009, 10:26   #1
Stan_Lite
Stan, Stan the FLASHER MAN!
 
Stan_Lite's Avatar
 
Join Date: Jul 2006
Location: In bed with your sister
Posts: 5,483
Default Excel gurus - formula help please?

I have a spreadsheet where I can input my weight in kilos and output it in pounds (extremely simple task). I decided I'd like it to do it in stones and pounds instead.

After much searching on t'interweb, I found the following formula
Code:
= INT(ROUND(A2*2.204623,0)/14)&"st "&TEXT(MOD(ROUND(A2*2.204623,0),14),"0")&"lb"
This works fine but it rounds it to the nearest pound. I'd like it to round to the nearest half pound but I can't work out for the life of me how to do it

Help please
__________________

Just because I have a short attention span doesn't mean I...
Stan_Lite is offline   Reply With Quote
Old 18-11-2009, 10:40   #2
Belmit
The Mouse King of Denmark
 
Belmit's Avatar
 
Join Date: Jul 2006
Location: The Winchester
Posts: 6,476
Default

Changing the 0's to 1's after the commas in the brackets will round to a further decimal place i.e. currently it's set to 0, so nothing after the decimal point (a whole pound)... if you change it to 1 it will round to 1 decimal place. Not sure how you'd make it round to the nearest half-pound though.
__________________
Belmit is offline   Reply With Quote
Old 18-11-2009, 10:44   #3
sara
G&T FFS!!!
 
sara's Avatar
 
Join Date: Jul 2006
Posts: 55
Default

Try this... it doesn't give you the stone separately, though.... Just done it now (I like these challenges!)

Stick headings of Kg and Lb in A1 and B1, input your Kg into A2, then stick this formula in B2:

=INT((A2*2.20462262))+IF(((A2*2.20462262)-INT((A2*2.20462262)))<=0.25,0,IF(((A2*2.20462262)-INT((A2*2.20462262)))>0.75,1,0.5))
__________________

More on swing dance in Bristol & the Facebook group.
sara is offline   Reply With Quote
Old 18-11-2009, 10:44   #4
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

Try...

Code:
=INT(ROUND(A2*2.204623,0)/14)&"st "&TEXT(MOD(ROUND(A2*4.409246,0),28)/2,"0.0")&"lb"
The rounding might be slightly off, but it seems to be within 0.1lb.

I did it by multiplying both of the numbers used in the calculation for lbs by two, and then dividing the result by two.
Mark is offline   Reply With Quote
Old 18-11-2009, 10:45   #5
Belmit
The Mouse King of Denmark
 
Belmit's Avatar
 
Join Date: Jul 2006
Location: The Winchester
Posts: 6,476
Default

Ah, I attacked the wrong 0's! I'm sure there's a clever way of coding it so it rounds to 0.5 but I doubt it would be a built-in function.
__________________
Belmit is offline   Reply With Quote
Old 18-11-2009, 10:51   #6
Feek
ex SAS
 
Feek's Avatar
 
Join Date: Jun 2006
Location: JO01ou
Posts: 10,062
Default

I did something like this before, I don't have Excel installed here so I can't check it exactly but I have an alternative so I can open the actual sheet and show me the formula I used although there might be some conversion oddities there.

In the cell which displayed my loss, I have the following:

Code:
=ROUND(CONVERT(G4,"kg","lbm")/14,0)&" st_x000D_"&MOD(ROUND(CONVERT(G4,"kg","lbm"),2),14)&" lb"
Which may or may not help?
__________________
Feek is offline   Reply With Quote
Old 18-11-2009, 10:51   #7
Rich_L
Dr Cocktapuss
 
Join Date: Jul 2006
Location: Seven Sizzles
Posts: 1,044
Default

Install the Analysis Toolpak and you can use the MROUND function I think, I'm just trying it now
*edit*

Ok yeah it works I think, bear with me while I try and get the formula right
__________________

Last edited by Rich_L; 18-11-2009 at 10:59.
Rich_L is offline   Reply With Quote
Old 18-11-2009, 11:01   #8
Stan_Lite
Stan, Stan the FLASHER MAN!
 
Stan_Lite's Avatar
 
Join Date: Jul 2006
Location: In bed with your sister
Posts: 5,483
Default

Quote:
Originally Posted by Mark View Post
Try...

Code:
=INT(ROUND(A2*2.204623,0)/14)&"st "&TEXT(MOD(ROUND(A2*4.409246,0),28)/2,"0.0")&"lb"
The rounding might be slightly off, but it seems to be within 0.1lb.

I did it by multiplying both of the numbers used in the calculation for lbs by two, and then dividing the result by two.
Thank you, that seems to work fine Mark. I knew it would be something simple like that but I'm an Excel noob so couldn't get my head round it.

Thanks very much for all your help and suggestions folks
__________________

Just because I have a short attention span doesn't mean I...
Stan_Lite is offline   Reply With Quote
Old 18-11-2009, 11:07   #9
Rich_L
Dr Cocktapuss
 
Join Date: Jul 2006
Location: Seven Sizzles
Posts: 1,044
Default

Ah yeah that's easier Do that, lol
__________________
Rich_L is offline   Reply With Quote
Old 18-11-2009, 11:09   #10
Stan_Lite
Stan, Stan the FLASHER MAN!
 
Stan_Lite's Avatar
 
Join Date: Jul 2006
Location: In bed with your sister
Posts: 5,483
Default

Quote:
Originally Posted by Rich_L View Post
Ah yeah that's easier Do that, lol
__________________

Just because I have a short attention span doesn't mean I...
Stan_Lite is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 16:17.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.