# Handling non-numbers when reading data from Excel

0

Hi all,

I would like to compute a simple ratio from two datasets:

```(pb - pa) / 2
```

I have some missing values in each series that are non-values. I would
like to not compute this ratio when pb or pa have "no value"

The series are loaded from xlsx, and I use the following command:

```vls = reshape(error(0),9,1);
vls[4] =9999.99; /* To convert all occurrences of #DIV/0! to 9999.99, and
all other empty cells and special types to GAUSS missing values */
```

But applying this synthax is not good, it compute the ratio because the
9999.99 is obviously a value... I do not find the good synthax

Somebody can help me?

Best,
Olivier

0

I believe that if you do not explicitly set the <tt>vls</tt> parameter, all instances of  DIV/0, Nan, missing values etc will be converted to a GAUSS missing value. Pass in an empty string for vls

```vls = "";
```

Then the elements with missing values will not compute the ratio, for example if after loading from your Excel sheet:

```pa = 10
5
.
8
3

pb = 2
3
9
.
1
```

Then (pa - pb)/2 =:

```4
1
.
.
1
```

If you want to remove the rows with missing values, you can use the packr function.

0

I believe that if you do not explicitly set the <tt>vls</tt> parameter, all instances of  DIV/0, Nan, missing values etc will be converted to a GAUSS missing value. Pass in an empty string for vls

```vls = "";
```

Then the elements with missing values will not compute the ratio, for example if after loading from your Excel sheet:

```pa = 10
5
.
8
3

pb = 2
3
9
.
1
```

Then (pa - pb)/2 =:

```4
1
.
.
1
```

If you want to remove the rows with missing values, you can use the packr function.

• ### Aptech Systems, Inc. Worldwide Headquarters

Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286

Phone: 360.886.7100
FAX: 360.886.8922

• ### Training & Events

Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.

• ### Tutorials

Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.

• ### Want to find out more?

Get a real answer from a real person

• ### Have a Specific Question?

Get a real answer from a real person

• Need Support?
• ### Support Plans

Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.

• ### User Forums

Join our community to see why our users are considered some of the most active and helpful in the industry!