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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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