+ Reply to Thread
Results 1 to 10 of 10

Counting the unique instances of a date in a row, containing different types of data

  1. #1
    Registered User
    Join Date
    11-12-2014
    Location
    Greenland
    MS-Off Ver
    2013
    Posts
    21

    Counting the unique instances of a date in a row, containing different types of data

    Hi there

    I have a sheet where data is organised in rows. Each column contains different types of data, like dates, free text, numbers etc. Some types of data (e.g., dates) appear in multiple columns and sometimes the same date appears twice.

    Is there a formula to count the number of unique dates in each row?

    Can I further upgrade this formula to only count unique dates where, for example, the cell always 2 columns before the cell containing the date must contain "yes"?

    Thank you!!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Counting the unique instances of a date in a row, containing different types of data

    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 use the paperclip icon to open the upload window.

    View Pic
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    11-12-2014
    Location
    Greenland
    MS-Off Ver
    2013
    Posts
    21

    Re: Counting the unique instances of a date in a row, containing different types of data

    Quote Originally Posted by Glenn Kennedy View Post
    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 use the paperclip icon to open the upload window.

    View Pic

    Ok - please see the attached example. I have made the cells yellow where the formulas should go. The first yellow column just needs to count the unique number of dates in that row, whereas the second column should count that number of unique dates that also have the text "outdoor" in the cell four columns down from each date column.

    Thank you.
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Counting the unique instances of a date in a row, containing different types of data

    Have you any idea why the "date" in Col D is not a date, while that in col R, is?? Try changing the format from short date to long date to see what I mean... this is making life a bit difficult.

  5. #5
    Registered User
    Join Date
    11-12-2014
    Location
    Greenland
    MS-Off Ver
    2013
    Posts
    21

    Re: Counting the unique instances of a date in a row, containing different types of data

    Quote Originally Posted by Glenn Kennedy View Post
    Have you any idea why the "date" in Col D is not a date, while that in col R, is?? Try changing the format from short date to long date to see what I mean... this is making life a bit difficult.
    I see what you mean... it's definitely unintentional, and must be how the data was captured. Is it possible to have an if statement that compensates for these two different formats? In the meantime, I will try get it fixed on my end (it's not something I have direct control over)...

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Counting the unique instances of a date in a row, containing different types of data

    Yes you can compensate, but it'll probably make your Q a lot more tricky to sort out...

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Counting the unique instances of a date in a row, containing different types of data

    half way there... I have the unique dates (after I manually changes a few non-date dates); but I'm struggling with the Outdoor/Indoor part.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    11-12-2014
    Location
    Greenland
    MS-Off Ver
    2013
    Posts
    21

    Re: Counting the unique instances of a date in a row, containing different types of data

    Quote Originally Posted by Glenn Kennedy View Post
    half way there... I have the unique dates (after I manually changes a few non-date dates); but I'm struggling with the Outdoor/Indoor part.

    Thanks! Sorry about the non-date dates. Couldn't you use some combination of index and match to get the row and column number of the unique value, and then pluck out the Indoors/outdoors value from those co-ordinates? The indoors/outdoors value is always a set no. of columns from the date. Just an idea.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Counting the unique instances of a date in a row, containing different types of data

    Grrr. I'm not sure if I'm pleased that I have a solution: or ready to kill you 'cos of the anguish getting there caused. I've had to create another sheet, to get the necessary association between the unique dates and the indoor/outdoor bit. You may need to move the dates and the in/out bits further apart (or maybe even on separate sheets??) and extend the range on your really wide sheet.

    In the end, OFFSET cracked it. I'll take a look at your other one tomorrow, providing the NYE bubbles haven't got the better of me.

    Any problems, shout...
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-12-2014
    Location
    Greenland
    MS-Off Ver
    2013
    Posts
    21

    Re: Counting the unique instances of a date in a row, containing different types of data

    Glenn, that's amazing! It seems to be working perfectly, thank you SO much! I will let you know if there any problems (doubt it though!).

+ 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. Counting unique instances above a certain quantity
    By ammartino44 in forum Excel General
    Replies: 9
    Last Post: 10-03-2014, 03:04 AM
  2. [SOLVED] Counting unique text instances with conditions
    By kazaly in forum Excel General
    Replies: 8
    Last Post: 11-19-2012, 11:44 PM
  3. Replies: 3
    Last Post: 07-18-2012, 11:53 AM
  4. Counting unique instances in an array.
    By Jerry McM in forum Excel General
    Replies: 2
    Last Post: 02-13-2009, 05:58 PM
  5. counting unique instances of text in a list
    By WadeSansing in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-01-2005, 01:57 PM

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