Skip to main content
1-Visitor
March 13, 2016
Question

Plz i need advice for excel mathcad connection

  • March 13, 2016
  • 4 replies
  • 2211 views

Hey,

maybe anyone can help me.

During Readexcel of a column i encountered an error.

I have the columns in excel via a when function so that: when(A1=0;"";A1) ----> Need a NaN in mathcad when the column in Excel shows a zero.

THe problem is the vector in mathcad is not NaN it is ""

And when i want to do a  max function mathcad encounters an error.

So i would need a NaN so that i can calculate with the vector something.

Now, how can i manage the function in excel so that in Mathcad the empty cells are regognised as NaN so that i can calculate somthing with it.

I dont know how i can do the function in excel.

Best thx ,

Stefan

4 replies

1-Visitor
March 13, 2016

the function when(A1=0;NV();A1) is nto working either 😞

Seems to be that the cell has to be completly empty

23-Emerald I
March 14, 2016

Doesn't EXCEL recognize NaN?

25-Diamond I
March 14, 2016

You have to write in Excel the string "NaN"  (in double quotes):

IF(A1=0; "NaN"; A1)  (or WENN(....) in the German version)

Don't be tempted to use Excels NA() as Mathcad won't recognize it.

WE

23-Emerald I
March 14, 2016

Okay, EXCEL doesn't use NaN as not a number, it's a string.  So we need to have Mathcad check:

25-Diamond I
March 14, 2016

To Excel The string "NaN" ist just a normal string

Its Mathcad which converts that special string to its NaN automatically

So no extra checking in Mathcad is necessary.

WE

1-Visitor
March 16, 2016

Bets Thx "NaN" is working 😃

25-Diamond I
March 16, 2016

Please close your thread by marking them as "answered".