+ Reply to Thread
Results 1 to 2 of 2

Count the number of times the value changes in a column

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    US
    MS-Off Ver
    Excel Office 365
    Posts
    66

    Count the number of times the value changes in a column

    How can you count the number of times the values change in a column? For example the list of items below should generate 7 changes. Is there a count function to do this?
    apple
    apple
    apple
    pear
    pear
    orange
    grape
    grape
    banana
    apple
    apple
    orange

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Count the number of times the value changes in a column

    well i make that 6
    apple to pear
    pear to orange
    orange to grape
    grape to banana
    banana to apple
    apple to orange
    =SUMPRODUCT(--(A1:A12<>A2:A13))-1 where a13 is a blank cell at the end of a list also gives 6
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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. [SOLVED] Count number of times names appear in a column
    By jeremysayshi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 01:24 PM
  2. [SOLVED] count the number of times each string appears in a column and make a summary column
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-04-2012, 08:02 AM
  3. Help with using VBA to count number of times different values appear in a column
    By compto in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-06-2012, 12:47 PM
  4. [SOLVED] Count number of times of name appears in a column
    By Ness78 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-01-2012, 08:14 AM
  5. [SOLVED] How to count the number of times column B is greater than column A
    By scorpiogirl in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-06-2012, 02:40 AM

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