Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering out non number values 1

Status
Not open for further replies.

JEB66

Mechanical
Jan 9, 2003
105
I use excell to sort and average some data collected via OSI's plant information system.

Ocasionally, there will be a problem with the server or the instruments which caused the archived value to read "invalid" or "bad data" or "no good data", whatever the divice is configured to read at those times.

I cannot use this to do any calculations because it is not a number. If there any function that will filter these cells out and replace them with a number or a null value?

Everything that I have tried comes up with #VALUE!.
 
Replies continue below

Recommended for you

Won't formatting the cells as Number prevent this?

Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.

 
Excel 2002 with SP3 will drop any non numeric data. What version of Excel are you using.
 
In Excel 2000, I arbitrarily tested the AVERAGE and MAX functions with 2 cells, one filled with text, the other a number. Regardless of formatting (text or number for the text filled cell), the functions performed correctly, that is, they ignored the text in the calculations.

Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.

 
I am using excel 2000.

Formatting did not help.

For me average add subtract if whatever still returns #VALUE!
 
analog, I did the same test as you did and it worked like you said.

I guess this tells us that the non numerical values I am getting from the PI servers is not text.

 
Jeb66:

If there are any cells with #N/A or #VALUE, they will propagate throughout the the calculation. For example, AVERAGE on cells occupied with 5 and #VALUE, will return #VALUE. Could this be the case in your sheet?

I'm sure there is a means to filter offending cells via macro on built in function, I am just a loss right now for the solution.
 
Try:
=IF(ISNUMBER(E1:E6),AVERAGE(E1:E6),0)
Enter as an array formula (Ctrl+shift+enter)
 
1) Add a column and fill it with ascending numbers (starting at the beginning of your list, and end at the final value).

2) Select all of the cells and sort by 2 criteria: the data, and then by new column. This should collect all of the text, and still preserve the order of the data.

Hope that helps!
 
Aviat You Rule!!! Have a star.

Just waht I was needing to know. Thanks a bunch
 
The syntax I had to use to make Aviat's (excellent) suggestion work is

{=AVERAGE(IF(ISNUMBER(E1:E6),E1:E6,""))}

The brackets {} indicate the array formula when you type (CTRL+SHIFT+ENTER)

Keep in mind that if you put a zero (0) at the end of the IF portion, that zero is averaged into the calculation. Putting a null value ("") into the calculation causes it to average only the remaining values.

At least, this is what I had to do. Note: Microsoft Excel 2000 with SP-3.

-InspEngr

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor