LINEST with start/end conditions to select data.

Josephfdebartolo

New Member
Joined
Oct 17, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I'm looking to predict data in pumping applications. given this. I will have unknow lengths of tables that will constantly have data added and removed.
I can't find a way to structure the selected data the way I would like it to be.

All data is expected to be quadradic, so my basic LINEST is =LINEST(C23:C33,B23:B33^{1,2},TRUE,FALSE)

I would like the formula to be along the lines of LINEST, Y DATA, from when first value in C23 to C54 is greater then 20% of starting flow, and to stop on last data point. X to be used if y data is used, skipped if y is skipped
=LINEST('for y values' IF(C23 > .2*A3,C23,SKIP):LAST CELL <> BLANK, 'for x values' start when y starts:end when y ends^{1,2},TRUE,FALSE)

there is a max of 50 data points, starting at row 23, and I have been manually selecting the data to make the equation work. but there is ALOT of (40 some) functions being manually edit. so looking to stream line it to auto select the data given the starting and end conditions.

View attachment 76431
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
This looks a bit overcomplicated, but might (might) work:
Excel Formula:
=LET(aArr,C23:C33,bArr,B23:B33,Thresh,A3*0.2,fromR,SMALL(IF(aArr>Thresh,ROW(aArr),99999),1),gRows,SEQUENCE( ROWS(aArr)-fromR+SMALL(ROW(aArr),1),,1+fromR-SMALL(ROW(aArr),1)),LINEST(INDEX(aArr,gRows),INDEX(bArr,gRows)^{1,2},TRUE,FALSE))
Try...
 
Upvote 0
This will take me a minute to understand what's going on. the starting condition does work so that is a massive step forward, but if the data length is shortened or increased, the formula doesn't find the new end. Thanks for the info and I'm going to see if I can make it completely work with some tweaking.
 
Upvote 0
A simple way could be creating two dynamic ranges, NameC that refers to values in column C and NameB that refers to values in column B; the in the formula you modify aArr,C23:C33,bArr,B23:B33, to
Excel Formula:
aArr,NameC,bArr,NameB,
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,189
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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