Deleting Rows on a set date/time criteria.

October 6, 2020 at 16:21:56
Specs: Windows 10
Hey I've been trying to find a way to delete the rows I need via formula without having to do change to much before it works.

When I download CSV, it stores time/date like this:
08:56  29-Sep
07:56  29-Sep
07:15  29-Sep
03:29  29-Sep
09:15  29-Sep
05:15  29-Sep
09:30  29-Sep
06:15  29-Sep


What I'm trying to do is delete certain rows based on a set criteria.

The criteria being Before 09:00 on today's date, and after 05:00 on tomorrow's date.

Is this possible without splitting the data up?


See More: Deleting Rows on a set date/time criteria.


#1
October 6, 2020 at 17:25:20
re: "I've been trying to find a way to delete the rows I need via formula"

A formula can not delete rows. A formula can only calculate a result. You might be able to hide rows with a filter or you might be able to delete rows with a macro (VBA).

However, I don't really understand your criteria, so I can't offer anything specific at this point.

When I see a time such as 06:15, I think 6:15 AM, so it looks to me like you want to delete all rows with times prior to 9:00AM today and after 5:00AM tomorrow. Is that correct?

If so, then based on the example data that you posted, all of those rows would be deleted, since they are all either before 9:00AM on 10/6/2020 or after 05:00AM on 10/7/2020. Your data doesn't include a year, but that doesn't matter since any September 29th is either before today or after tomorrow.

Perhaps I'm missing something. If so, please explain your goal in a little more detail. Often times it helps if you post example data in a "before and after" scenario. Something like:

Here's my original data ...

Data1
Data2
Data3
Data4

... and here is what it should like after the task is complete:

Data2
Data4

message edited by DerbyDad03


Reply ↓  Report •

#2
October 9, 2020 at 07:39:50

There are numerous ways to do this but not with the help of formula as formulas can assist you only in identifying data. You will need to upload all the CSV data into Excel, then sort the data and delete the rows you don't need

Reply ↓  Report •

#3
October 9, 2020 at 08:45:48
re: "You will need to upload all the CSV data into Excel, then sort the data and delete the rows you don't need"

While it is true that a formula can not be used to delete rows, it may not be necessary to "sort then delete the rows".

It is very possible that a VBA macro can perform the requested task "automatically". As I noted in my response, we need a little more information before we can proceed down that path.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •
Related Solutions


Ask Question