CT Witter
MrExcel MVP
- Joined
- Jul 7, 2002
- Messages
- 1,212
I have 2 Tables: 1 Contains by Date/Time Data and the other contains when equipment goes off of lease and we buy.
Trying to create 2 queries, one that will sum up items in lease, one that we bought.
Here are my tables:
First is the raw data:
This is the lease equipment table:
This is what the output should be for the leases table:
And this is what the equipment we own should look like:
I need help creating the date range parameters to accomplish this. I need to be able to query a subset using the Date/Time Field. IE if I just queried 1/1/05 I should only have items in lease.
Any ideas or help?
Thanks,
CT
Trying to create 2 queries, one that will sum up items in lease, one that we bought.
Here are my tables:
First is the raw data:
Book1.xls | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | ID_Type | Name | ServiceTime | Date | ||
2 | 1 | Test | 1 | 1/1/20057:51 | ||
3 | 2 | Test2 | 2 | 1/1/20058:51 | ||
4 | 1 | Test | 1.6 | 1/2/200513:00 | ||
5 | 1 | Test | 4 | 1/3/200515:25 | ||
Sheet1 |
This is the lease equipment table:
Book1.xls | ||||||
---|---|---|---|---|---|---|
G | H | I | J | |||
1 | AutoID | ID_Type | LeaseInService | LeaseOutService | ||
2 | 1 | 1 | 1/1/2005 | 1/2/2005 | ||
3 | 2 | 2 | 1/1/2005 | 12/31/9999 | ||
Sheet1 |
This is what the output should be for the leases table:
Book1.xls | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
9 | output1 | |||||
10 | ID_Type | Name | ServiceTime | Date | ||
11 | 1 | Test | 1 | 1/1/20057:51 | ||
12 | 2 | Test2 | 2 | 1/1/20058:51 | ||
13 | 1 | Test | 1.6 | 1/2/200513:00 | ||
Sheet1 |
And this is what the equipment we own should look like:
Book1.xls | ||||||
---|---|---|---|---|---|---|
F | G | H | I | |||
9 | output2 | |||||
10 | ID_Type | Name | ServiceTime | Date | ||
11 | 1 | Test | 4 | 1/3/200515:25 | ||
Sheet1 |
I need help creating the date range parameters to accomplish this. I need to be able to query a subset using the Date/Time Field. IE if I just queried 1/1/05 I should only have items in lease.
Any ideas or help?
Thanks,
CT