Ignoring positive values on graph.

rickblunt

Well-known Member
Joined
Feb 18, 2008
Messages
603
Office Version
  1. 2019
Platform
  1. Windows
Greetings, I have been staring at this for an hour, trying a few things and I can't seem to figure it out. :) I am using the formula below on a line graph so that I can ignore the outliers from the data that is being shown on the graph. (J1 is where I enter the outlier limit number) It works fine but I would like to tweak the formula so that I can also ignore the positive values, I only want the negative values to be shown on my chart.

I know that I could just set my graph axis range to ignore >0, but I would kind of like to have any positive value also display "NA". Can this code be tweaked to only allow negative values? I appreciate any input.


Excel Formula:
=IF(AND(ABS(C98-C97)>$J$1,ABS(C98-C99)>$J$1),NA(),C98)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

JGordon11

Active Member
Joined
Jan 18, 2021
Messages
470
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Maybe

Excel Formula:
IF(OR(C98>0,AND(ABS(C98-C97)>$J$1,ABS(C98-C99)>$J$1)),NA(),C98)

or

Excel Formula:
IF((C98>0)+(ABS(C98-C97)>$J$1)*(ABS(C98-C99)>$J$1),NA(),C98)
 
Solution

rickblunt

Well-known Member
Joined
Feb 18, 2008
Messages
603
Office Version
  1. 2019
Platform
  1. Windows
Thanks JGordon, that first one worked perfect.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,492
Messages
5,832,011
Members
430,103
Latest member
BIGGAZ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top