• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sort Table - Data in 2-3 rows

waratah2014

New Member
Greetings

Hoping someone can suggest me something or point me in the right direction, I have a data where I need to sort by start time ( in order ascending/descending) but issue for me, some cells have data in more than 1 row which is to be sorted as well along.

Also is this something can be automated by macro, as will be working on this on daily basis to create a sheet from similar looking file format to the one which is sorted by start/finish time a nicely manner.

I have attached a file for an example, cell highlighted in orange is to sorted and as result want cells in yellow highlight should sort along with it. My first row should show earliest start time and so on.

Sorry have not used excel for few years and now back in admin work, every step seems a challenge but will get there. Thanks for your time on this.
 

Attachments

  • Sort - Template.xlsx
    14.3 KB · Views: 5
waratah2014
This is the first sample.
Press [ SORT ]-button to sort.
Note: Cell's C54 -value is different (number) than others (which are texts).
I would use time-value for fhose.
Question: How to handle those 'lines', which do not have times?
 

Attachments

  • Sort - Template.xlsb
    21.6 KB · Views: 3
waratah2014
This is the first sample.
Press [ SORT ]-button to sort.
Note: Cell's C54 -value is different (number) than others (which are texts).
I would use time-value for fhose.
Question: How to handle those 'lines', which do not have times?
much appreciated your time on this.

Will I be able to use this on different template or I have to copy paste in this sheet ? I need to test by adding 100 more lines worth of data

Is there a formula which I edit ? sorry its seems way out of my league to figure out how this macro working or formula used. But I liked the way its sorting, need to add more rows to see its does the trick for me. Also, keen to learn this as well.

* regarding the cells with different format (number/text), I can manually adjust before I sort the data to make it work.
I am kind of restricted to use the time format '1600' ( text/number) instead of 04:00 PM or 16:00

* re: lines with no data, if there is a person name with no time and next column shows 'OFF/EDO' then I can manually exclude or delete the rows as its not required as such for the activity
 
waratah2014
# Will I be able ...
Try to use it with that file.
# I need to test by adding 100 more lines worth of data
Oh ... did You give a hint about that before? ... it should work too.
# Is there a formula which I edit ?
There is one macro. It should ... could work without editing, which I could test with Your sample data.
It shows - its steps. If You won't need that relaxing feature, let me know.
# I am kind of restricted to use the time format '1600'
... then use same format with all times - 1600 by number could be different than 1600 by text.
# * re: lines with no data, ...
Those could take care ( eg delete) same time while sorting.
> Keep on testing and let me know - how do it work with real data. <
 
Thanks again, it seem to be working, have to format the cell (text, in my case), I can update before I run the data on the sheet.

So I have tried 2 times with over 100 plus lines, its seems to work and slight adjustment needed which is work in progress from my end.

'Sort' via button can be undo ? once ran or have to copy-paste the data over it again as cant be un done ? sorry about the noob question.

Lastly if I have to paste the data over the existing header (test file) or move header further down and paste values then sort via button, hope this wont create issues ? am I correct.

appreciate your kindness
 
waratah2014
# [ Sort ] and undo ... hmm? why?
Test this way ...
You can select any of those cells and it will come 'green'.
by upper/lower lines gives sort order ... test.
Screenshot 2022-07-14 at 11.28.06.png
After that press [ Sort ] to do ... sorting.

# Lastly...
Header have to be exact in that position.
... or results could be ... what ever!
 

Attachments

  • Sort - Template.xlsb
    32.3 KB · Views: 3
Back
Top