+ Reply to Thread
Results 1 to 2 of 2

Counting how many consecutive negative or positive numbers in column.

  1. #1
    Registered User
    Join Date
    10-26-2014
    Location
    Melbourne, Australia
    MS-Off Ver
    excel ( for mac ) 2008
    Posts
    27

    Smile Counting how many consecutive negative or positive numbers in column.

    Hi all,

    I have a column of numbers ( a mix of positive and negative ) I want to have it displayed in the neighbouring cell how many of that kind of number ( positive or negative ) have been in sequence up until that cell.

    I have attached an example.

    Cheers.
    Attached Files Attached Files

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

    Re: Counting how many consecutive negative or positive numbers in column.

    In C3, then copied down:

    =IF(SIGN($B3)=SIGN($B4),"",(ROW()-(IFERROR(LOOKUP(2,1/(SIGN($B2:$B$3)<>SIGN($B3)),ROW($B2:$B$3)),ROW($B$2))))*SIGN($B3))
    _________________
    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)

Similar Threads

  1. Trend formula- consecutive positive and negative numbers
    By Col83 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-05-2014, 02:53 AM
  2. [SOLVED] Find consecutive 15 positive or negative numbers in a column
    By Sarangsood in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2013, 05:26 AM
  3. [SOLVED] Count Consecutive Positive/Negative numbers
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2013, 01:02 PM
  4. Sum of time for consecutive positive/ negative numbers
    By DexterG in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-25-2012, 04:03 AM
  5. Replies: 6
    Last Post: 11-13-2012, 07:33 AM

Tags for this Thread

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