+ Reply to Thread
Results 1 to 9 of 9

Sort a range of data by date and hour (two columns) if there are duplicate entries

  1. #1
    Forum Contributor
    Join Date
    10-25-2013
    Location
    türkiye
    MS-Off Ver
    Excel 2021
    Posts
    130

    Sort a range of data by date and hour (two columns) if there are duplicate entries

    How can I sort a range of data by date and hour (two columns) if there are duplicate entries using functions not VBA.

    Please see the sample file.

    Thank you for your help.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,035

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    With Power Query

    Mcode:
    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    10-25-2013
    Location
    türkiye
    MS-Off Ver
    Excel 2021
    Posts
    130

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    The table seems to be okey. But my data is not constant. All the entries are taken from other sheets by selecting a name from a dropdown list. So the result sould be dynamic. whenever I choose a different name, the table (data) changes.

  4. #4
    Forum Contributor
    Join Date
    10-25-2013
    Location
    türkiye
    MS-Off Ver
    Excel 2021
    Posts
    130

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    The table seems to be okey. But my data is not constant. All the entries are taken from other sheets by selecting a name from a dropdown list. So the result sould be dynamic. whenever I choose a different name, the table (data) changes. That is why I want a solution using a function.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,035

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    In PQ, if you update the table (either increase the number of items or decrease the number of items or change the values), and then click on the refresh button, it will automatically update your output. PQ is dynamic. Suggest you read the links I provided for a better understanding. If you have PQ loaded, then test it and see if you get the expected results.

  6. #6
    Forum Contributor
    Join Date
    10-25-2013
    Location
    türkiye
    MS-Off Ver
    Excel 2021
    Posts
    130

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    Thank you for your guidance. I installed it and I will try to learn more But I wonder if I can find it on any computer...

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,811

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    To get the hour, course, R-1 and R-2 columns (I:K) to display correctly sorted data try:
    Pasting the following formula into cell I2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Pasting the following into cell J2 and copy down and then copy across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Contributor
    Join Date
    10-25-2013
    Location
    türkiye
    MS-Off Ver
    Excel 2021
    Posts
    130

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    Thank you so much. That is what I want.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,811

    Re: Sort a range of data by date and hour (two columns) if there are duplicate entries

    You're Welcome and thank you for the feedback. I hope that you have a blessed day.

+ 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. SUMIF Job Entries Over Date Range + Ignore Duplicate Job Entries
    By sansai in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-07-2019, 09:12 PM
  2. [SOLVED] Formula to Count Duplicate entries in Data Range
    By kenadams378 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-30-2014, 11:16 AM
  3. Replies: 5
    Last Post: 06-07-2013, 03:28 PM
  4. [SOLVED] Count no. of data in a range, counting duplicate entries once
    By Rianne in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-12-2013, 12:31 AM
  5. How do I? Hour by Hour Occurrences between a Date Range?
    By lesoies in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2013, 09:01 PM
  6. [SOLVED] Parse data and combine values for duplicate entries for the same date
    By rlaserra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2012, 10:27 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