Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copy by timevalue to last row

Sort of a long question, but worth a try. I have a dispatching spreadsheet
that copies electric outage events from a database to various service centers
for dispatching. Let's say I run the report @ 0600 and more events come in
after 0600. The report is already in place by service center and I just want
to filter (by code) the more recent events and copy over to the last row of
the existing report. (there are 14 service centers)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default copy by timevalue to last row

You haven't given very much details to get the best answer. We don't know
what your existing code looks like especially the query to the database.
Sometimes it makes sense to just rerun the report. Other times it make sense
to look at last line of the report for the time and then query the database
of events occuring after this time.

"HarveyM." wrote:

Sort of a long question, but worth a try. I have a dispatching spreadsheet
that copies electric outage events from a database to various service centers
for dispatching. Let's say I run the report @ 0600 and more events come in
after 0600. The report is already in place by service center and I just want
to filter (by code) the more recent events and copy over to the last row of
the existing report. (there are 14 service centers)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default copy by timevalue to last row

Hi Joel, this is a daily report and usually runs at 0600. The code erases the
previous day report and querys by service center from the database. It then
timestamps the query time on an update tab that shows the service center when
the last query was made. Once the report is run, the supervisor has to
finialize by requesting the type of crew needed for each event. If I rerun
the report, this info wouldn't be correct..therefore....a new query would
have to be added to the bottom of the last query and not contains duplicates
from a previous time query. The code is a simple macro recording of a
database filter, selecting each service center and then coping the info to a
different tab marked for that service center.

"Joel" wrote:

You haven't given very much details to get the best answer. We don't know
what your existing code looks like especially the query to the database.
Sometimes it makes sense to just rerun the report. Other times it make sense
to look at last line of the report for the time and then query the database
of events occuring after this time.

"HarveyM." wrote:

Sort of a long question, but worth a try. I have a dispatching spreadsheet
that copies electric outage events from a database to various service centers
for dispatching. Let's say I run the report @ 0600 and more events come in
after 0600. The report is already in place by service center and I just want
to filter (by code) the more recent events and copy over to the last row of
the existing report. (there are 14 service centers)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default copy by timevalue to last row

It appears only two changes would be required to your present query.

1) The Desination line would have to be changed to place new data after the
last data.

from
Destination := Range("A1")

to
LastRow = Range("A" & Rows.count).end(xlup).Row
Destination := Range("A" & LastRow) + 1

2) The query would need some type of WHERE parameter added to select items
after a certain time

queryString = _
"SELECT * FROM product.dbf WHERE (product.ON_ORDER<0)"



"HarveyM." wrote:

Hi Joel, this is a daily report and usually runs at 0600. The code erases the
previous day report and querys by service center from the database. It then
timestamps the query time on an update tab that shows the service center when
the last query was made. Once the report is run, the supervisor has to
finialize by requesting the type of crew needed for each event. If I rerun
the report, this info wouldn't be correct..therefore....a new query would
have to be added to the bottom of the last query and not contains duplicates
from a previous time query. The code is a simple macro recording of a
database filter, selecting each service center and then coping the info to a
different tab marked for that service center.

"Joel" wrote:

You haven't given very much details to get the best answer. We don't know
what your existing code looks like especially the query to the database.
Sometimes it makes sense to just rerun the report. Other times it make sense
to look at last line of the report for the time and then query the database
of events occuring after this time.

"HarveyM." wrote:

Sort of a long question, but worth a try. I have a dispatching spreadsheet
that copies electric outage events from a database to various service centers
for dispatching. Let's say I run the report @ 0600 and more events come in
after 0600. The report is already in place by service center and I just want
to filter (by code) the more recent events and copy over to the last row of
the existing report. (there are 14 service centers)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
timevalue function busterpace Excel Worksheet Functions 2 October 8th 06 03:39 AM
TimeValue formula Phrank Excel Worksheet Functions 2 September 20th 06 10:27 AM
iserror(Timevalue()) Basil Excel Programming 5 May 5th 05 01:26 PM
OnTime / TimeValue Myriam Excel Programming 0 April 6th 05 11:41 PM
Need Help with Code - TimeValue Donnie Stone Excel Programming 1 October 4th 03 04:14 PM


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"