+ Reply to Thread
Results 1 to 11 of 11

Problem with interpolating data

  1. #1
    Registered User
    Join Date
    02-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Problem with interpolating data

    I have a problem with interpolating. When the residuel of a data point (polyline-data point) is 2x standard deviation (allready calculated), then I want reject the data point and it appears red, "rejected" and thick. Then I want to interpolate with the previus and next datapoint.

    When 2 datapoints are rejected after each other this no longer goes. When this is the case I want to replace the data point with the polyline value.

    I tried to make something, but it runs stuck.

    Please Login or Register  to view this content.
    Last edited by Elise.B; 03-20-2009 at 10:16 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Problem with interpolating data

    Do you not just need to test the cells before loading their contents into a variable. That way last know usable values will be kept.

    If you need more help it would be useful if you could post example data set.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Problem with interpolating data

    I know that 'nextgoodtop' gets the value rejected. Thats why it won't interpolate. But I don't know how to program it the right way that if the next line is rejected that it just copies the poly value.
    example.xls

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Problem with interpolating data

    How do you think this should work? Maybe you mean if the cell in the next row is "Rejected"?

    Please Login or Register  to view this content.
    And you appear to be double counting. You increment the variable Counter and the CheckedRow variable by Counter.


    Why not add a do loop within the test for Rejected so you just move over those cells.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Problem with interpolating data

    Yes, I added the next thing, but this doesn't yet do the work. I still get a 'mismatch' when it tries to calculate Topdiff = (NextgoodTop - LastgoodTop). And I get an 'object defined' error it this line: ElseIf Cells(checkedrow + 1, AfterRejectionEColomn) = "Rejected" Then

    Please Login or Register  to view this content.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Problem with interpolating data

    This runs without error but I have no idea whether the output is correct.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Problem with interpolating data

    Yes it does indeed something.

    What I would like is if there are two or more rows in a column after each other that are called "rejected" then I want to paste a value from the polycolumn to those cells. Otherwhise I interpolate with the macro, how to program that?
    what is wrong about the following?

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Elise.B; 03-20-2009 at 08:41 AM.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Problem with interpolating data

    Perhaps it would make things clearer if you posted a workbook that included examples of the calculated results you are expecting.

  9. #9
    Registered User
    Join Date
    02-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Problem with interpolating data

    It does now the job, but it goes on with the autofill and displays false.
    How to fill only when there is data in de cells next to it?
    example.xls

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Problem with interpolating data

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    02-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Problem with interpolating data

    Thanks, it working also the interpolating

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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