slope

dmheller

Board Regular
Joined
May 26, 2017
Messages
156
Office Version
  1. 365
I am having trouble with a slope equation.
=slope(if(Q7:1506>1,Q7:Q1506),if(And(F7:F1506>Y1480,F7:F1506<Y1481),F7:F1506))
ctrl+Shift+entr
Column Q is a bunch of data numbers only
Column F is dates
Column Y are the 2 dates I am looking between
I want to get the slop of the data between the dates but only for data numbers greater than 1.
An help would be great.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I think your formula got mangled by this forum's GUI. Always put spaces around " > " and " < " (although I think only one of them is a problem).

We cannot use AND(), OR() etc in array-entered formulas because those functions take array paremeters themselves.

Try something like the following, array-entered. Pay close attention to whether you want " > " and " < " or " >= " and " <= ".

=SLOPE(IF(Q7:Q1506 > 1, Q7:Q1506),
IF(Q7:Q1506 > 1, IF(F7:F1506 > Y1480, IF(F7:F1506 < Y1481, P7:P1506) ) ) )
 
Upvote 0
Disregard the SLOPE formula in my previous response. I was so focused on the replacing the use of AND() that I overlooked the flaw in your logic in the first parameter. The conditions for selecting "y" and "x" data must be the same, to wit:

=IFERROR(SLOPE(IF(Q7:Q1506 > 1, IF(F7:F1506 > Y1480, IF(F7:F1506 < Y1481, Q7:Q1506) ) ),
IF(Q7:Q1506 > 1, IF(F7:F1506 > Y1480, IF(F7:F1506 < Y1481, P7:P1506) ) ) ) , "")

I added an IFERROR wrapper, just in case less than 2 rows of data meet all of the conditions.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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