+ Reply to Thread
Results 1 to 2 of 2

Linest of rows matching criteria

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    Leicester
    MS-Off Ver
    Excel 2007
    Posts
    2

    Linest of rows matching criteria

    Hi,

    I've been trying to use Linest function in a way that it will act only on the rows that match a specific criteria. The table has >1800 rows and 3 columns. First column has an identifier value, second column is the known_x's, and the third column would be for the known_y's. The identifier would match the criteria, which has >230 different numbers. The following table shows a bit of what I have:

    ID 434 434 434 434 434 435 435 435 435 435 436 436 436 436
    NumPair 1 2 3 4 1 2 3 4 1 2 3 4
    InstantFrequency 0.032 0.043 0.053666667 0.055 0.035333333 0.039 0.045666667 0.049666667 0.018666667 0.021 0.022666667 0.023666667
    Criteria 434 435 436

    (sorry for the crappy format)

    So, I'd like to obtain the m value and the y interception from each group of number (434, then 435, then 436). I tried a few things with MATCH and INDEX but without success.
    If anyone has any idea of what I could do, it would be great!

    Cheers!
    Last edited by RodGob; 12-12-2013 at 05:51 AM.

  2. #2
    Registered User
    Join Date
    12-11-2013
    Location
    Leicester
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Linest of rows matching criteria

    I actually found out a way of solving my problem. I'll post it here in case anyone else needs something similar.

    In one extra column (H), I added the following equation, to be the start of the search:
    =MATCH(G2,$A$1:$A$1830,0)

    Another column (I) has the end of the search:
    =MATCH(G3,$A$1:$A$1830,0)-2

    Then I used Address nested inside of Indirect to force Linest to get the values I wanted:
    {=LINEST(INDIRECT(ADDRESS(H2,5,4)&":"&ADDRESS(I2,5,4)),INDIRECT(ADDRESS(H2,4,4)&":"&ADDRESS(I2,4,4)))}

    It seems that Address on its own doesn't return as a cell reference, therefore the use of Indirect.

    I hope this helps anyone else.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Hide rows not matching criteria
    By Hello Shell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2013, 11:23 PM
  2. Within a loop, need to copy all rows from one sheet to another upon matching criteria
    By ripvanbrown in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2012, 03:52 PM
  3. delete rows not matching certain criteria
    By sanketgroup in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2011, 04:04 PM
  4. Lookup criteria matching in rows and columns
    By JuJuBe in forum Excel General
    Replies: 2
    Last Post: 05-20-2010, 05:03 PM
  5. Identify rows matching certain criteria
    By Daz783 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-13-2010, 10:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1