+ Reply to Thread
Results 1 to 5 of 5

Need to distinguish between first and second data occurence

  1. #1
    Registered User
    Join Date
    05-23-2016
    Location
    Pittsburgh
    MS-Off Ver
    2013
    Posts
    3

    Need to distinguish between first and second data occurence

    I have time and date data that uniquely corresponds to a location ID. The data I received is in 12 hour format without any indicators of AM or PM. Each of these unique time and dates has a duplicate meaning one is AM and one is PM.

    Is there an if statement that can be written to output a 1 for the first occurrence of that time and date and a 2 for the second occurrence?

    Thanks!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Need to distinguish between first and second data occurence

    maybe =COUNTIF($A$2:A2,A2) and dragged down?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    05-23-2016
    Location
    Pittsburgh
    MS-Off Ver
    2013
    Posts
    3

    Re: Need to distinguish between first and second data occurence

    That was just outputting a "2" for all occurrences unfortunately

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Need to distinguish between first and second data occurence

    Without seeing what the data looks like it is difficult to develop a good formula. Go advanced to upload a small sample so you can get better help.

  5. #5
    Registered User
    Join Date
    05-23-2016
    Location
    Pittsburgh
    MS-Off Ver
    2013
    Posts
    3

    Re: Need to distinguish between first and second data occurence

    To clarify, I have about 90,000 cells of data (90,000 rows.) Each has a date and time in the same cell and they are all formatted the same. What I'm looking for is for the formula to search the cells and output a 1 for the first occurrence of the specific date and time and a 2 for the second occurrence.

    For example, 2015/09/01-01:00 is cell E2 and 2015/09/01-01:00 is cell E14543. In column F, I would like an output of 1 in F2 and output of 2 in F14543. Does that make sense?

+ 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] I need a formula that will distinguish blocks of data with sub headings as they are foud
    By john dalton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-15-2015, 10:40 AM
  2. distinguish data from multiple sheets vba
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-02-2013, 12:21 PM
  3. match or compare 2 columns to distinguish duplicate data
    By gchauhan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2012, 05:53 PM
  4. Replies: 2
    Last Post: 03-21-2012, 12:28 PM
  5. Counting occurence of multiple cells containing data
    By BrakZak in forum Excel General
    Replies: 8
    Last Post: 11-08-2007, 09:52 AM
  6. Find the last occurence of data in a list
    By Bernman in forum Excel General
    Replies: 5
    Last Post: 06-26-2007, 12:47 AM
  7. [SOLVED] Find first occurence of specific data in a column.
    By Ben in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2005, 11:06 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