+ Reply to Thread
Results 1 to 2 of 2

Formulas for conditionally replicating values needed

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    22

    Formulas for conditionally replicating values needed

    Hi,
    Can anyone look inside my file and see if they can produce formulas to answer these questions?

    Max number of Consecutive +1 values
    Max number of Consecutive -1 values
    Frequency of 1 Consecutive -1 values
    Frequency of 2 Consecutive -1 values
    Frequency of 3 Consecutive -1 values
    Frequency of 4 Consecutive -1 values
    Frequency of 5 Consecutive -1 values


    Thank you very much for trying!
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formulas for conditionally replicating values needed

    hi schill. it would be good if you can manually type out what you are hoping to see next time, so that we can know if we're on the right track. all these are array formulas:

    D1
    =MAX(FREQUENCY(IF($A$2:$A$200=1,ROW($A$2:$A$200)),IF($A$2:$A$200<>1,ROW($A$2:$A$200))))

    D2
    =MAX(FREQUENCY(IF($A$2:$A$200=-1,ROW($A$2:$A$200)),IF($A$2:$A$200<>-1,ROW($A$2:$A$200))))

    D3 & below are another set
    =SUM(IF(FREQUENCY(IF($A$2:$A$200=-1,ROW($A$2:$A$200)),IF($A$2:$A$200<>-1,ROW($A$2:$A$200)))=1,1))
    just change it to 2-5 for the next few rows. if you have many, then use ROWS to help you make it incremental. for eg.
    =SUM(IF(FREQUENCY(IF($A$2:$A$200=-1,ROW($A$2:$A$200)),IF($A$2:$A$200<>-1,ROW($A$2:$A$200)))=ROWS(D$3:D3),1))
    copying that down will make it 2, 3, 4 & so on..

    ...all of the formulas to be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formulas for conditionally replicating values needed
    By schill2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2013, 07:27 AM
  2. conditionally copy formulas and paste their values based on columnA
    By cmmchick in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-29-2013, 05:02 AM
  3. [SOLVED] Replicating Worksheet References in Formulas
    By Cloudburst99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-04-2011, 09:09 AM
  4. Replicating Formulas between excel files
    By Nickchups in forum Excel General
    Replies: 3
    Last Post: 07-29-2005, 11:05 AM
  5. Replicating Formulas with Various Worksheet References
    By Cloudburst99 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-20-2005, 08:06 PM

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