+ Reply to Thread
Results 1 to 2 of 2

Sequences of positive and negative numbers in array

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    Sverige
    MS-Off Ver
    Excel 2007
    Posts
    4

    Sequences of positive and negative numbers in array

    I have a column with 1000 cells and its a random mix of positive and negative numbers.

    What I want to do is to create a formula that answers the statements below in 4 individual cells:

    * How long is the most negative number sequence (How many straight losses)

    * What is the sum of that sequence of losses (Total down streak)

    * How long in the most positive number sequence (How many straight wins)

    * What is the sum of that sequence of winnings (Total up swing)

    I also would like to answer the following:

    * What is the average downswing / upswing in sequence number
    * What is the average downswing / upswing summorized

    Been googling around, think i need to create array using FREQUENCE but I really cant grasp how to implement!

    Thankful for help!
    Last edited by papayagirl; 05-29-2013 at 05:46 PM.

  2. #2
    Forum Contributor
    Join Date
    05-08-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    102

    Re: Sequences of positive and negative numbers in array

    The Excel spreadsheet I have created will answer the first four asterisks you pose. Here is how to read my spreadsheet:

    Column A: This is where you enter your sequence or list of numbers.

    Columns B thru Columns E: These columns are there to help generate the output.

    Columns G and H should give you what you need.

    A few important things to note.

    (1) The formulas in cell C1 and the rest of column C are different in nature.
    (2) The formulas in cell E1 and the rest of column E are different in nature.
    (3) This spreadsheet assumes that the winnings are strictly positive or strictly negative, i.e., no zero winnings.
    (4) This spreadsheet assumes that there is always a mix of strictly positive and strictly negative numbers. If there are only strictly positive numbers, then the output relating to the losing total and losing streak will show 1 (and you will know from seeing this that there are only winnings in your list in Column A). A similar situation holds for the case when there are only losses. Book1.xlsx

+ 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