Help: flexible handling of units of measure (inches, cm, meters)

jordiejones

New Member
Joined
May 5, 2010
Messages
31
Hey all, I have a formula that splits a persons height from its unit of measure (in,cm,m) it’s intention is to be flexible to quickly capture the metric from different data sources. When I started working on if I used IFS but some of our data entry people are on older versions of Excel. Is there a way to say IF( A2 is only “m” then A1, then IF SEARCH A2 finds *in* CONVERT(A1,”in”,”m”) then IF SEARCH A2 finds *cm* CONVERT(A1,”cm”,”m”).

the problem I ran into is I can figure out how to get it to differentiate between the JUST “m” vs “*cm*. Any help would be greatly appreaciated.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You could search for cm before you search for m, something like:

=CONVERT(A1,INDEX({"cm","in","m"},MATCH(1,COUNTIF(A2,{"*cm*","*in*","*m*"}),0)),"m")
 
Upvote 0

Forum statistics

Threads
1,224,745
Messages
6,180,699
Members
452,994
Latest member
Janick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top