+ Reply to Thread
Results 1 to 3 of 3

count consecutive negative days

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    johannesburg south africa
    MS-Off Ver
    Excel 2003
    Posts
    3

    count consecutive negative days

    Hello, I'm trying to figure out a formula to tell me how long a price has been negative for (consecutive days up until todays date)
    For example:

    21 June 20 June 19 June 18 June 17 June 16 June 15 June 14 June
    .....-3........-2.........-8..........5...........4...........3.........-5........-8....

    If todays 21st June - How many days has the row been negative for: answer = 3 days (incl 21st)

    So, firstly, only if the number is negative - then I want to know how long has it been negative for.

    many thanks in advance for the help
    Paul

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: count consecutive negative days

    Maybe this:

    =TODAY()-MAX(IF($A$2:$J$2>=0, $A$1:$J$1))

    comfirmed with ctrl+shift+enter

    or this:

    =MAX(A1:J1)-MAX(IF($A$2:$J$2>=0, $A$1:$J$1))

    comfirmed with ctrl+shift+enter

    where in first row are dates and in second row values
    Last edited by zbor; 06-21-2010 at 08:04 AM.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: count consecutive negative days

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this
    Audere est facere

+ 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