Sort and move data

Occasional Contributor

I am looking to create a macro that sorts data and moves it.  I have a list of dates/times and I want the top row to be where the data is added, but not the top row of the data after it gets sorted.


I attached a screenshot for reference.  Basically the employee types the info in the boxes with the border, clicks the button (that has a recorded macro/or whatever is needed) and that data gets added into the bottom portion and sorted by oldest to newest date.  After you click the button the boxes with the border go back to blank and they can type in the new information again and sort it.


The only thing I can do is sort it but it always adds the data back into the input boxes, which I want blank after the sort

9 Replies


In the attached file you can enter data in range A2:F2 and then click the button in cell H2. Maybe this is what you want to do. Currently the macro sorts data that is within range A6:F10000.

Yea, I used what you sent and modified.
Now if I could keep the format (ex keep the main boxes where they are adding data) to a different color or a border and it wouldnt sort it when you click the button it would be great.


See attached file. I hope this is what you want to do.



This is exactly what I am looking for, I added my data to it and it works great.

Is there a way to add a line of code to sort by start time after it sorts by date?

Thanks a ton and I attached our combined ones for reference, I basically have a lot of events on the same day and need them organized by start time.


Also, is there a way to have the data validation to auto populate when you start typing?  Like if I start typing a date/lane option it will auto fill instead of scrolling through a year of dates?

Is there also a way to hide the top few rows and have it only print the sheet without me selecting active selection time?


I added a line of code in order to have the data sorted by start time after it is sorted by date.


I never did auto populate before but i am interested how this can be done and i found VBA code in the internet which i couldn't implement in the spreadsheet so far.


However i found a solution without VBA and implemented this in sheet "Tabelle2". It works for the lane options. I had to move the entry form down to row 72 in order to add the possible lane options in range E1:E67. For the date options the quickest solution is to manually type "13.03.2022" for example or to use the drop down list.

Yea the auto type is tough when it comes to data. I appreciate all the help with everything.
Here is a good one, is there a way to get this to work on a mac? Half our systems are mac and macros dont work, along with the Data valadation doesnt transfer over, which means I have to build the lists on every Mac for some reason.


I have no experience working with a Mac. I’m afraid I can’t help you with that.