Consulting

Results 1 to 6 of 6

Thread: Calculating Max and Min Value of RTD without capturing them.

  1. #1

    Lightbulb Calculating Max and Min Value of RTD without capturing them.

    Hi, I trade in stocks using RTD function in my excel sheet.
    Can anyone tell me if there is any way to store the maximum and minmum value of RTD (which are always updating continuously) of a particular time-period without storing them.
    To be specific, In my excel sheet, from 10:00 am to 10:05 am I get RTD values. Now I want to know the highest (lowest or average) value within this time, without storing them continuously in excel sheet.

    Actually by continuously storing value in excel sheet, the sheet gets pretty big in size.

  2. #2
    VBAX Expert Leith Ross's Avatar
    Joined
    Oct 2012
    Location
    San Francisco, California
    Posts
    552
    Location
    Hello Tuhin Paul,

    Welcome!

    I noticed you post this same question in another forum earlier today. Most forums have rules about posting the same question in multiple forums, known as cross-posting. Please take the time to read the forum's rules once you have become a member. It will help get your questions answered quickly and correctly.

    Question cross-posted Excel Forum
    Sincerely,
    Leith Ross

    "1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG"

  3. #3
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    With Range("A1")
    If .Value = 0 Then
    .Value = RTD
    Else
    .Value = Min(.Value, RTD)
    End If
    End With

    Range("B1") = Max(Range("B1"), RTD)
    Range("C1") = Range("C1") + RTD
    Range("D1") = RTD_Count
    Range("E1") = Range("C1") \ Range("D1") 'Average RTD
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  4. #4

    Unhappy

    Quote Originally Posted by Leith Ross View Post
    Hello Tuhin Paul,

    Welcome!

    I noticed you post this same question in another forum earlier today. Most forums have rules about posting the same question in multiple forums, known as cross-posting. Please take the time to read the forum's rules once you have become a member. It will help get your questions answered quickly and correctly.

    Question cross-posted Excel Forum
    Sorry Leith, I didn't know that I thought I would get quicker and better reply if I post this question at multiple blogs...

  5. #5
    Thanks SamT, for your contribution. What is .Value function is actually doing here. If the RTD value is in negative (in case of RTD of Spreads) will it work?

  6. #6
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Dim Foo As Range
    
    With Foo
    'All below relates to Foo: Because "With."
       .Value = Bar   'Value is a Property of a Range
    End With   '(Not using Foo now)
    The leading Dot ( .) inside the With... End With relates Properties and Methods to the Object (Foo,) that the With is concerned about.

    For example:
    Dim Foo As Collection
    
    With Foo
       .Add Bar   'Add is a Method of Collections
    End With
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

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