#1
|
|||
|
|||
Filter, Sort, Macro... what to do?
Hi, i'm trying to select and copy only certain rows of data. I've tried filtering but can't get it to work due to the date and time both being in one cell and wanting a range.
Basically I have a large amount of data with the date and time in the first column and then various things in the columns after it like this I want to have say only only the rows which have morning data between 10:00 and 12:00. It doesn't matter if it just copies to rows bellow the original data, copies it to a new sheet or just deletes the rows I don't want as I will just be copy and pasting it into another application. If I try sorting or filtering I run into problems with the date and time both being in the same cell or looking for a specific value in a cell when i'm after a range of values and I don't have a clue about macros or anything else. |
#2
|
||||
|
||||
I don't have any trouble filtering a date range that includes times. Simply choose Date Filers>Between and input the range. Since dates are integers and times are decimals, you just need to be careful about how you specify the range. For example, if you input just 10/10/2015 as the start date, 10/10/2015 11:12 is after that. So, filtering for dates after 10/10/2015 would mean starting after 10/10/2015 23:59:59 (or starting on 11/10/2015).
If you want to filter according to time values, use a separate column to extract just the time portion (eg =MOD(A1,1)), then filter that column.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks for the reply.
Pulling the time into a separate column and filtering that works manually but not if I do a numbers between. The two macros from the cross post seem to get the job done http://www.ozgrid.com/forum/showthread.php?t=197170. |
#4
|
||||
|
||||
In the future, please post links to your cross-post in your original question.
read this to understand why
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking for Help to Create a Macro (Sort) | rsrasc | Word VBA | 5 | 04-16-2014 03:25 AM |
Macro for Advanced Filter | atwood121 | Excel Programming | 0 | 05-22-2012 07:47 PM |
Forgotten Sort and Filter Criteria | rbdmg | Mail Merge | 0 | 10-31-2011 09:14 PM |
Sort table using macro | saslotteroy | Word VBA | 2 | 09-15-2011 02:41 PM |
sort & filter icon not available or icon not highlighted | survivo01 | Excel | 1 | 08-08-2011 03:41 AM |