+ Reply to Thread
Results 1 to 4 of 4

Numerical Integration

  1. #1
    Registered User
    Join Date
    12-22-2008
    Location
    Sweden
    Posts
    56

    Numerical Integration

    Hi
    I've a set a data with time in onle column and dta values in the others.
    I would like to make a vb function that simultates a mathematical intergration, that is a vb function

    Function integration(timerange as range, datarange as range,Result as double)

    Please Login or Register  to view this content.
    Could you help me out with this?

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

    Numerical Integration

    Please Login or Register  to view this content.
    But you don't need VBA. If the data is in A1:B10, then

    =SUMPRODUCT( (A2:A10 - A1:A9) * (B1:B9 + B2:B10) ) / 2

    ... gives the same result.
    Last edited by shg; 02-09-2009 at 01:58 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-22-2008
    Location
    Sweden
    Posts
    56

    Re: Numerical Integration

    Thanks a lot!.

    How do I call the function within a button for example:

    NumInt(sheet.??, sheet.??)?

    What's the syntax for a range? in a function?

  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: Numerical Integration

    =NumInt(A1:A10, B1:B10)

+ 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