SLOPE with the occasional n/a value?

Berrett

Board Regular
Joined
Aug 6, 2004
Messages
249
I need to return the slope of a line, but there are occasional missing values, which, given the formulas that I'm using, return as "#N/A". This is necessary so that my charts will work properly.

However, my SLOPE formula stops working as soon as it encounters an n/a value anywhere in the referenced data.

Anyway to get around this?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I haven't ever used the slope formula and wouldn't know if the expected results I got were right or not, but maybe try something like:

=SLOPE(IF(ISNA(A2:E2),"",A2:E2),IF(ISNA(A1:E1),"",A1:E1))

This needs to be confirmed with control+shift+enter and not just enter.

If this doesn't work, post back with some sample data and expected results.

Hope thta helps.
 
Upvote 0
I need to return the slope of a line, but there are occasional missing values, which, given the formulas that I'm using, return as "#N/A". This is necessary so that my charts will work properly.

However, my SLOPE formula stops working as soon as it encounters an n/a value anywhere in the referenced data.

Anyway to get around this?

Example...

Control+shift+enter, not just enter:

=SLOPE(IF(ISNUMBER(B2:B7),B2:B7),IF(ISNUMBER(A2:A7),A2:A7))
 
Upvote 1
Thanks to both of you. I tried Aladin's first and it worked, so I'm sticking with it. But I appreciate both of your help very much.

This place is amazing.
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,724
Members
449,465
Latest member
TAKLAM

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
Back
Top