+ Reply to Thread
Results 1 to 10 of 10

VBA : search and make difference between 2 dates

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    VBA : search and make difference between 2 dates

    Hi guys,

    Please open this file :

    Fichier exemple.xlsm

    I have a huge problem. According to my file, I need to calculate what is called the "time between dates" in my file with a VBA code.

    There is already a VBA function who calculates well the maximum drawdown. The complement I want needs to add in my function must calculate : When the maximum drawdown was ( 12.03.2003), when he as finished ( 03.01.2006) and how many days long it was ( 1028 days).

    Please...help me ! I must send this document to be assess on friday !

    Thank you so much !

    jack

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: VBA : search and make difference between 2 dates

    Please Login or Register  to view this content.
    Last edited by haripopuri; 11-14-2012 at 07:26 AM.

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: VBA : search and make difference between 2 dates

    Thank you for answering,

    The dates are only in column A, the price are in the column B. Any idee ?

  4. #4
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: VBA : search and make difference between 2 dates

    How to calculate Maximum drawdown's date & Recovery date?

  5. #5
    Registered User
    Join Date
    11-14-2012
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: VBA : search and make difference between 2 dates

    Ahi,
    Here's the an explanation of the maximum drawdown.

    http://www.babypips.com/school/drawd...-drawdown.html

    The recovery date stands for the time you have to wait from the maximum drawdown to the moment where you are one more time at your investment point.

    If you see my file attached on the 1st post, it's easier to understand (there's also the VBA code in "modul 1")

  6. #6
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: VBA : search and make difference between 2 dates

    Hi,

    Intead of macros, you can do it in excel if you want.

  7. #7
    Registered User
    Join Date
    11-14-2012
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: VBA : search and make difference between 2 dates

    I need to do it in VBA, it concerns a report I have to do for University.

  8. #8
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: VBA : search and make difference between 2 dates

    Please check if attachment helps you.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-14-2012
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: VBA : search and make difference between 2 dates

    It works, thank you ahi.

  10. #10
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: VBA : search and make difference between 2 dates

    Glad I could help. If the reply resolved your query please update thread as 'solved'

+ 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