Skip to main content
1-Visitor
February 21, 2012
Solved

Changing units of input variables

  • February 21, 2012
  • 2 replies
  • 2384 views

Hi all,

If I use an Excel component in Mathcad and pass any number of input variables into the Excel Spreadsheet, is there a way to control what units are passed into the spreadsheet?

I've already tried:

  • Multiplying the input by the correct unit. (e.g. if I wanted a variable to pass as an meter, I tried writing VariableA*m in the input feild.... doesn't work.)
  • Changing the overall units of the spreadhseet. For some variables this works gloriously as you can see in the attached spreadsheet. But for others (power and pressure) it doesn't seem to work.

Please see the attached Mathcad sheet. If you change the Worksheet Units from SI to U.S. you will see the weird behavior of some units properly adjusting while others give incorrect values.

Any advice would be appreciated.

Edit: I'm using version 15 of Mathcad if that makes a difference.

Best answer by Fred_Kohlhepp

Excel doesn't know about units. Mathcad knows about units, it will convert from one to another for you. If you want a particular unit for Excel, divide the variable by that unit (like scaling a graph) and you'll send a unitless number of the right value off.

2 replies

23-Emerald I
February 21, 2012

Excel doesn't know about units. Mathcad knows about units, it will convert from one to another for you. If you want a particular unit for Excel, divide the variable by that unit (like scaling a graph) and you'll send a unitless number of the right value off.

1-Visitor
February 21, 2012

Perfect! Thank you so much...