+ Reply to Thread
Results 1 to 11 of 11

Track column value change

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    77

    Track column value change

    Hello

    I am trying to work out a way to track the number of times column value changes.

    I have a single column of colours and would like to track every time it changes with values of 1 and 2. For example, colours red, blue, green, yellow & brown returning 1,2,1,2,1 etc. Please refer to the attached spread sheet. I tried the IF statement but can’t get it right.

    Could someone help please?

    Thanks
    Hoss
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Track column value change

    In Row 2

    =IF(A2<>A1,D1+1,1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,289

    Re: Track column value change

    Please Login or Register  to view this content.
    maybe this one?
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Track column value change

    Hi Ace_XL

    Thank you for your reply. I applied your formula but it doesn't seem to work unless I am doing it wrong?!! Please see attached.

    Could you please let me know how to get it right?

    Thanks
    Hoss
    Attached Files Attached Files

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Track column value change

    In your example use

    =IF(A2<>A1,B1+1,1)

    without any absolute ('$') references. Copy down

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,289

    Re: Track column value change

    Please Login or Register  to view this content.
    I'm still looking for a shorter one

  7. #7
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Track column value change

    Hi popipipo

    Thank you for your reply. Your formula does not seem to work either. I get 1,2,2,2,2,2,1,2,2,2,2,2 instead of 1,2,2,2,1,1,2,1,1,1,1,1. Please let me know if I am doing something wrong?!

    Thanks
    Hossein

  8. #8
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Track column value change

    Hi popipipo

    Thank you for your reply. Your formula does not seem to work either. I get 1,2,2,2,2,2,1,2,2,2,2,2 instead of 1,2,2,2,1,1,2,1,1,1,1,1. Please let me know if I am doing something wrong?!

    Thanks
    Hossein

  9. #9
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,289

    Re: Track column value change

    Another formula found.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Track column value change

    Hello popipipo

    Your second formula is working fine thanks and I don't mind that it is not short.

    Thanks
    Hoss

  11. #11
    Registered User
    Join Date
    11-13-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Track column value change

    Hi Ace_XL

    I am still getting wrong result but I have now got a working formula from popipipo.

    Thanks again
    Hoss

+ 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