+ Reply to Thread
Results 1 to 5 of 5

Comparing values in one column for each unique value in another column

  1. #1
    Registered User
    Join Date
    07-06-2017
    Location
    Philadelphia
    MS-Off Ver
    2010
    Posts
    1

    Comparing values in one column for each unique value in another column

    Hi all!

    I often use this forum to find answers to questions I have, but I have been unable to find one, so here I am...posting for the first time.

    I have three column. One is a time column, one is a system assigned ID column, and one is a user assigned ID column. The system assigns a new ID each time a new user is detected and that system ID is retained for each update (once per second) until the user is no longer detected. If a period of 30 seconds or more passes and the user returns, the system assigns them a new ID. I've found an issue where there are some false reports being generated. Basically here is what I want to do:

    For each unique user assigned ID (this is always retained no matter what) I would like to examine the system assigned IDs and determine if, at some point in the file, user assigned ID is assigned a new system ID and then, later on, reverts back to the original system ID. Here is a super simplified example of what I'm dealing with:

    Time System ID User ID
    9:00:01 5 123
    9:00:02 5 123
    9:00:03 5 123
    9:00:04 5 123
    9:00:05 5 123
    9:00:06 5 123
    9:00:07 6 123
    9:00:08 6 123
    9:00:09 6 123
    9:00:10 5 123

    9:00:11 5 123
    9:00:12 8 124
    9:00:13 8 124
    9:00:14 8 124
    9:00:15 8 124
    9:00:16 9 124
    9:00:17 9 124
    9:00:18 9 124
    9:00:19 8 124

    9:00:20 8 124


    Basically I want to see, "hey! for user ID 123, the system ID changed from 5 to 6 and then back to 5. For user ID 124, the system ID changed from 8 to 9 and then back to 8).

    Perhaps one way would be to, for each unique USER ID, highlight the rows in a different color for each unique system ID.

    I know this is confusing. I am thoroughly confused and probably didn't do a good job explaining this.

    Thanks for any help that anyone may be able to provide!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Comparing values in one column for each unique value in another column

    We'd need to see the code and a Workbook would also help - so, if you can:

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Comparing values in one column for each unique value in another column

    Hi n604ff

    Welcome to the forum....
    Not sure if this will help but here's my spin anyway...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Comparing values in one column for each unique value in another column

    Assuming data in Col.A,B & C
    Please Login or Register  to view this content.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Comparing values in one column for each unique value in another column

    Or perhaps
    Please Login or Register  to view this content.
    Edited...Code change
    Last edited by sintek; 07-08-2017 at 02:35 AM.

+ 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] How to count unique distinct values from a column where values in other column exists ?
    By Daniel Tou in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-19-2017, 05:48 PM
  2. [SOLVED] Comparing Same Column to Column for Matches and then Comparing Offset Values
    By Exia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-01-2015, 12:00 PM
  3. Replies: 2
    Last Post: 08-19-2015, 10:22 AM
  4. Replies: 10
    Last Post: 10-09-2014, 09:20 AM
  5. Replies: 19
    Last Post: 03-15-2014, 04:50 PM
  6. Replies: 3
    Last Post: 10-15-2012, 10:42 AM
  7. Count Unique Values In One Column Basis Unique Values in Another Column
    By shez_raz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2012, 01:55 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