Hi
I have a long set of data (like 1500 rows or more - its for example stock prices). In those data sometimes there is a bad dataprovider, so I get a very wrong price and therefore I cant make a proper graph of it. How can I somehow smooth that or exclude the bad data points (I dont wanna do it with the axis on the graph).
LPN
One way is that you can overwrite the "bad" entries with the formula =NA() this will put the #N/A error in the cell and won't be plotted on the chart.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Is the bad data in one specific column? You could add another column to interpret that column and make corrections, supressing bad data altogether and then chart this helper column.
Or if the corruption is in a specific format, perhaps a macro to clean the data up prior to charting?
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Hi,
You can use Data Validation to stop BAD data entry and you can get a smooth graph.
Click on
Data -- > Validation.
Shijesh Kumar
http://shijesh.wordpress.com/
ok, I might not have been specific. The column where I have the data will change on an ongoing basis, so I need an automatic function - I cant just put in NA() manually.
Then use a "helper" column with an If() statement that says, if the value is ok, then use it otherwise stick an #N/A.
e.g. =If(A1=condition_for_true,A1,NA())
enter your actual condition in the italisized part.
Then plot that helper column
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
I have tried this but I cant find a solution with an IF statement that works. Is there something called trim average (I mean an average where you might take out the top and bottom 25 %).
There is a Large() and Small() function....
e.g. =Large(A1:A100,25) will tell you the 25th largest number and =Small(A1:A100,25) will tell you the 25th smallest number.
.. then you can use an IF() statement like =IF(OR(A1<Large($A$1:$A$100,25),A1>Small($A$1:$A$100,25)),A1,NA())
adjust ranges to suit and copy down
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
I have attached a data example. It should be very easy to see the bad data - pls. let me see if you can do something to it.
Put this formula in D4 and copy it down the list...
You will see some #N/A's ....but maybe you need to increase that 25% marker because a lot of big ones still fall within...Code:=IF(OR(C4>=LARGE(C:C,25),C4<=SMALL(C:C,25)),NA(),C4)
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Hmm it was a good try, but I cant get it to work properly. If you find any other ideas, pls. let me know.
Can you show us how it did not work?
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Look at attachment.
Well, the #N/A's didn't get plotted as far as I can see...
And to get rid of the out-of-wack numbers, you may have to increase the 25 to 50 or higher..
e.g. =IF(OR(D3>=LARGE(D:D,50),D3<=SMALL(D:D,50)),NA(),D3)
or just pick a number out of the hat (like 500 as your max) and use a formula like:
=IF(D3>=500,NA(),D3) so that all the ones over 500 don't get plotted...
If these don't work... then it's a job for Andy Pope (our resident Chart Guru)
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
The problem is that the numbers change, so I cant make a fix that above 500, cause in other circumstances that should be above 1000 maybe, and in others again its 200.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks