+ Reply to Thread
Results 1 to 6 of 6

Best-fitting an array

  1. #1
    Registered User
    Join Date
    02-10-2015
    Location
    Notts, England
    MS-Off Ver
    2010
    Posts
    3

    Best-fitting an array

    Hi. I'm new to forums like this.

    In Excel, I have an array of 30 random positive and negative values.

    I wish to execute a best-fit via a corresponding cell formula that can be used
    to adjust all the values in their individual negative or positive family group, in
    one direction away from the absolute maximum deviation accordingly, regardless
    of the sign of that maximum value:

    Using initially only the highest negative and highest positive value, I have first
    subtracted half the absolute difference between them for a value to be the best-fit
    adjustment factor.

    Typically my adjusted column would look something like below.

    0.210 0.220
    0.140 < == THESE VALUES TO THESE == > 0.150
    0.110 0.120
    -0.261 -0.251
    0.111 0.121
    0.117 0.127
    0.279 HIGHEST POSITIVE .279 0.289
    -0.024 -0.014
    -0.299 HIGHEST NEGATIVE .299 + (highest of the 2 values) -0.289
    -0.115 ------ -0.105
    0.170 578 / 2 = .289 0.180
    0.035 0.045
    0.027 .299 - .289 = .010 (best fit adjustment value) 0.037
    -0.138 ==== -0.128
    0.081 0.091
    0.102 0.112
    -0.016 -0.006
    0.267 0.277

    I'm betting this isn't too tricky right?

    Cheers

    OK my column spacing has gone nuts when posted. Sorry about that.
    Last edited by Parky102!; 02-10-2015 at 12:48 PM. Reason: Clarification

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Best-fitting an array

    Best if you attach a workbook with your data and your notes. Ideally, it would also include your expected results (even if they are hand calculated). You're correct, the loss of column spacing is confusing the issue. Maybe this is what you are looking for?
    =ABS(MAX($A$1:$A$7)+MIN($A$1:$A$7))/2+A1

    This assumes your input is in A1:A7; adjust accordingly
    Last edited by Pauleyb; 02-11-2015 at 12:48 PM.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    02-10-2015
    Location
    Notts, England
    MS-Off Ver
    2010
    Posts
    3

    Re: Best-fitting an array

    Not quite what I was looking for thanks but here's my attached sheet.

    Book10.xls

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Best-fitting an array

    Can you explain what rule you used to rearrange column E to column H?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Best-fitting an array

    =e7-(max($e$7:$e$24)+min($e$7:$e$24))/2

    (and I believe your H23 cell is miscalculated)
    Last edited by Pauleyb; 02-12-2015 at 03:43 PM.

  6. #6
    Registered User
    Join Date
    02-10-2015
    Location
    Notts, England
    MS-Off Ver
    2010
    Posts
    3

    Re: Best-fitting an array

    Thanks Pauleyb. That is the prob resolved. Cheers for that!

+ 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. Excel 2007 : How to do a Data Fitting?
    By Nokia N93 in forum Excel General
    Replies: 3
    Last Post: 12-20-2011, 03:07 AM
  2. curve fitting
    By somsankarsen@gmail.com in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-03-2006, 02:10 PM
  3. Curve fitting in Excel
    By Vidya Raja in forum Excel General
    Replies: 1
    Last Post: 01-06-2006, 03:25 PM
  4. [SOLVED] Best fitting curve
    By ladee_bird in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2005, 09:05 AM
  5. best curve fitting
    By ladee_bird in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-20-2005, 03:05 AM

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