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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,224,543
Messages
6,179,429
Members
452,914
Latest member
echoix

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