Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default function to change metric measurements

The base units are mm to be converted to m, cm or left as mm.

So we always start with 1234 mm =1.234 m or 1m 23.4 cm = 123 cm 4mm (123.4 cm)

"Bearacade" wrote:


I am not sure you are giving us the right example of what you want..

1234m does not equal to 1 M 23.4 CM

nor does 1234cm = 123 cm 4 mm and vise versa..

I did take what I think you meant and put this into a formula (it's not
pretty, but it works) and you don't have to set up a macro or fuction,
so that if you put:

1234mm will convert to cm and mm (123 cm 4 mm)
1234cm will convert it to M and cm (1 M 23.4 cm)

you can play around with this.

=IF(RIGHT(A1,2)="mm",QUOTIENT(LEFT(A1,LEN(A1)-2),10)&" cm
"&MOD(LEFT(A1,LEN(A1)-2),10)&"
mm",IF(RIGHT(A1,2)="cm",QUOTIENT(LEFT(A1,LEN(A1)-2),1000)&" M
"&MOD(LEFT(A1,LEN(A1)-2),1000)/10&" cm"))


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=559040


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
Can function in one cell change value or function in another cell? me Excel Worksheet Functions 4 February 27th 06 01:04 PM
What is the Formula to Convert Imperial to Metric Measurements compu_trainer Excel Worksheet Functions 5 May 30th 05 04:25 AM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Custom Function not being auto calculated when cells change..help? Alex Wolff Excel Worksheet Functions 4 March 22nd 05 07:06 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 04:06 PM.

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

About Us

"It's about Microsoft Excel"