I have a worksheet of "Loads"
that contains a growing list of loads done by drivers. This worksheet grows with new rows daily. I am wanting to have a seperate worksheet called "New Loads"
in the same workbook that only contains the rows from "Loads"
that falls withing a date range.
For example, I want to pull all the rows from worksheet "Loads"
into worksheet "New Loads"
when the worksheet "Loads"
cell A1
"Delivery date"
falls between worksheet "New Loads"
cell A1
"start date"
and A2
"end date"
.
I also am wanting any data pulled into the "New Loads"
worksheet to overwrite all old date that was previously pulled. So that way the only data in "New Loads"
is data that matches the date range.
Best Answer
You want to extract a report from "Loads" based records that fall between a given "start date" and "end date".
There might be several ways to do this. This answer uses the
QUERY
function to display the record details.Use this formula:
=query(Loads!A2:C,"select A, B, C where A>=date '"&TEXT(B1,"yyyy-mm-dd")&"' and A<=date '"&TEXT(B2,"yyyy-mm-dd")&"'")
When dates are used as criteria in a query, there are two issues to consider:
TEXT()
New Loads
Loads