+ Reply to Thread
Results 1 to 3 of 3

Need help in making Excel formula that counts number of days in a trade....

  1. #1
    Registered User
    Join Date
    09-08-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    3

    Need help in making Excel formula that counts number of days in a trade....

    I need some help in coming up with a formula that would do the following:

    Basically (refer to the screenshot below) I need a formula for Column W that would post a number 1 whenever Column O is not "-" and then continue counting until Column T posts a "Flip" text.
    In the screenshot below, I've shown an example of what I want the formula to display (only this time I've manually entered the Count).
    Since I'm dealing with over 20 Years of data, I'd appreciate if someone could suggest a formula for this as opposed to me doing it manually.

    Thanks in advance!

    screenshot.jpg

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Need help in making Excel formula that counts number of days in a trade....

    Hi
    posting a sample file instead of an image would help

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need help in making Excel formula that counts number of days in a trade....

    Assuming data starts at row2 (it can't start at row1), put this formula in W2 and copy down:

    =IF(OR(O2="Bearish", T2="Flip", AND(T2="-",ISNUMBER(X1),T1<>"Flip")), N(X1)+1, "")


    Note: Images are usually a pain, a file encourages helpers to dive in and help more quickly.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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