Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Seb Seb is offline
external usenet poster
 
Posts: 6
Default Converting Metric to Imperial

I have converted metric into imperial using the convert function which gives
me the result I want, however Excel doesn't write it in this format 11'3"
but rather as 11,3

Is there any way that Excel can show the proper way (11'3") ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Converting Metric to Imperial

what formula did you use

"Seb" wrote:

I have converted metric into imperial using the convert function which gives
me the result I want, however Excel doesn't write it in this format 11'3"
but rather as 11,3

Is there any way that Excel can show the proper way (11'3") ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Seb Seb is offline
external usenet poster
 
Posts: 6
Default Converting Metric to Imperial

=CONVERT(D6,"m","ft")

"bj" wrote:

what formula did you use

"Seb" wrote:

I have converted metric into imperial using the convert function which gives
me the result I want, however Excel doesn't write it in this format 11'3"
but rather as 11,3

Is there any way that Excel can show the proper way (11'3") ?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Converting Metric to Imperial

The answer is not in feet and inches, but in feet with decimals.
3.429m gives 11.25m, which is 11ft 3in.

You could try something like
=INT(MROUND(CONVERT(D6,"m","ft"),1/12))&"'"&MOD(MROUND(CONVERT(D6,"m","ft"),1/12),1)*12&""""The complication is to avoid getting things like 11'12"--David Biddulph"Seb" wrote in ... =CONVERT(D6,"m","ft") "bj" wrote: what formula did you use "Seb" wrote: I have converted metric into imperial using the convert function whichgives me the result I want, however Excel doesn't write it in this format11'3" but rather as 11,3 Is there any way that Excel can show the proper way (11'3") ?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Seb Seb is offline
external usenet poster
 
Posts: 6
Default Converting Metric to Imperial

Thanks David, that works great, however with for example 3.08 m the result is
10'0.999999999999986". Is there any way to avoid this or to have it round up
as well?
Thanks


"David Biddulph" wrote:

The answer is not in feet and inches, but in feet with decimals.
3.429m gives 11.25m, which is 11ft 3in.

You could try something like
=INT(MROUND(CONVERT(D6,"m","ft"),1/12))&"'"&MOD(MROUND(CONVERT(D6,"m","ft"),1/12),1)*12&""""The complication is to avoid getting things like 11'12"--David Biddulph"Seb" wrote in ... =CONVERT(D6,"m","ft") "bj" wrote: what formula did you use "Seb" wrote: I have converted metric into imperial using the convert function whichgives me the result I want, however Excel doesn't write it in this format11'3" but rather as 11,3 Is there any way that Excel can show the proper way (11'3") ?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Converting Metric to Imperial

Ah, yes, I should have guessed that rounding errors would creep in.

=INT(MROUND(CONVERT(D6,"m","ft"),1/12))&"'"&ROUND(MOD(MROUND(CONVERT(D6,"m","ft"),1/12),1)*12,0)&""""
will cope with your example, but I fear that at some stage it will fall foul
of another rounding hiccup.

=INT(CONVERT(D6,"m","ft"))&"'"&ROUNDDOWN(MOD(CONVE RT(D6,"m","ft"),1)*12,0)&""""
will round the inches down.

Another option which might be more robust might be
=INT(ROUND(CONVERT(D6,"m","in"),0)/12)&"'"&(MOD(ROUND(CONVERT(D6,"m","in"),0),12)&""" ")--David Biddulph"Seb" wrote in ... Thanks David, that works great, however with for example 3.08 m the resultis 10'0.999999999999986". Is there any way to avoid this or to have it roundup as well? Thanks "David Biddulph" wrote: The answer is not in feet and inches, but in feet with decimals. 3.429m gives 11.25m, which is 11ft 3in. You could try something like=INT(MROUND(CONVERT(D6,"m","ft"),1/12))&"'"&MOD(MROUND(CONVERT(D6,"m","ft"),1/12),1)*12&""""The complication is to avoid getting things like11'12"--David Biddulph"Seb" wrote ...=CONVERT(D6,"m","ft" ) "bj" wrote: what formula did you use "Seb"wrote: I have converted metric into imperial using the convertfunction whichgives me the result I want, however Excel doesn't write itin this format11'3" but rather as 11,3 Is there any way thatExcel can show the proper way (11'3") ?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Seb Seb is offline
external usenet poster
 
Posts: 6
Default Converting Metric to Imperial

That will do, thank you very much!

"David Biddulph" wrote:

Ah, yes, I should have guessed that rounding errors would creep in.

=INT(MROUND(CONVERT(D6,"m","ft"),1/12))&"'"&ROUND(MOD(MROUND(CONVERT(D6,"m","ft"),1/12),1)*12,0)&""""
will cope with your example, but I fear that at some stage it will fall foul
of another rounding hiccup.

=INT(CONVERT(D6,"m","ft"))&"'"&ROUNDDOWN(MOD(CONVE RT(D6,"m","ft"),1)*12,0)&""""
will round the inches down.

Another option which might be more robust might be
=INT(ROUND(CONVERT(D6,"m","in"),0)/12)&"'"&(MOD(ROUND(CONVERT(D6,"m","in"),0),12)&""" ")--David Biddulph"Seb" wrote in ... Thanks David, that works great, however with for example 3.08 m the resultis 10'0.999999999999986". Is there any way to avoid this or to have it roundup as well? Thanks "David Biddulph" wrote: The answer is not in feet and inches, but in feet with decimals. 3.429m gives 11.25m, which is 11ft 3in. You could try something like=INT(MROUND(CONVERT(D6,"m","ft"),1/12))&"'"&MOD(MROUND(CONVERT(D6,"m","ft"),1/12),1)*12&""""The complication is to avoid getting things like11'12"--David Biddulph"Seb" wrote ...=CONVERT(D6,"m","ft" ) "bj" wrote: what formula did you use "Seb"wrote: I have converted metric into imperial using the convertfunction

whichgives me the result I want, however Excel doesn't write itin this format11'3" but rather as 11,3 Is there any way thatExcel can show the proper way (11'3") ?


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Converting Metric to Imperial

=INT(CONVERT(D6,"m","ft"))&"'"&ROUNDDOWN(MOD(CONVE RT(D6,"m","ft"),1)*12,0)&""""
will round the inches down.


If rounding down is acceptable, here is a (far more cryptic to decipher)
formula that is 12 characters shorter than yours (well, actually 13
characters shorter if you remove the "neatening up" space that I placed
between the feet and inches sections)...

=TEXT(CONVERT(D6,"m","ft")-MOD(CONVERT(D6,"m","ft"),1)/2,"d' h\""")

Rick

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting 00:15:00 format into metric The Rook Excel Discussion (Misc queries) 1 February 9th 07 10:34 AM
change imperial to metric Kangarule Excel Discussion (Misc queries) 3 September 17th 06 05:41 PM
What is the Formula to Convert Imperial to Metric Measurements compu_trainer Excel Worksheet Functions 5 May 30th 05 04:25 AM
Metric to imperial measurements Gill.star Excel Discussion (Misc queries) 7 March 7th 05 01:57 AM
How do I convert imperial to metric in Exel? Struttrogers Setting up and Configuration of Excel 1 January 23rd 05 06:33 PM


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"