Scheduling Macro For Every 5 Minutes
Sep 9, 2006
I have a simple macro that I run when I hit "Ctr Q".
How do I ensure that this macro runs every 5 minutes automatically from the first time I hit "Ctr-Q". Currently, it only runs once and then stops.
Here's my macro for your view:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 08-09-2006 by Scott
'
' Keyboard Shortcut: Ctrl+q
'
Range("B6").Select
ActiveCell.FormulaR1C1 = "NOW()"
Range("B6").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("A4").Select
End Sub
View 9 Replies
ADVERTISEMENT
May 25, 2011
I have a spread sheet with a colum showing average time to complete a task. This is currently shown as Days:Hours:Minutes:Seconds (4:19:33:19). I meed it to be shown purely as minutes, or at least as hours and minutes.
View 4 Replies
View Related
Dec 5, 2006
I have a formula which will calculate the number of hours and minutes between two military times. I would like it to calculate the total number of minutes instead of hours and minutes. I have uploaded a small example of what i have so far.
View 3 Replies
View Related
Jul 4, 2006
What formula will convert 4.50 to 530 minutes ( "Decimal Time" )
another example 16.50 to 1250 minutes.
View 13 Replies
View Related
Jan 21, 2009
I'm trying to convert 3786 minutes to day:hours:minutes. So divided it by 1440 which is 2.63... but I want this displayed in the worksheet as 2 days 1 hour and 3 minutes (02:01:03), I just can't seem to get it to work and it seems quite simple... but I'm missing something.... I was trying a custom format like dd:hh:mm or [d]:hh:mm and I was also trying a convert function and =day/1440+hour +minute
View 9 Replies
View Related
Aug 22, 2006
creating a formula for converting time data that has been created in an excel spreadsheet in minutes i.e. 516 minutes which I need to turn into Hours and Minutes i.e. 08:36 I am not experienced using Formulas, apologies if this question has been posted before, I did use the search facility to look for threads, but could not find anything related
View 5 Replies
View Related
Oct 23, 2012
is there a code i can have where i can a pause a macro and then run it after 10 mins from that point?
View 5 Replies
View Related
Oct 3, 2007
I am trying to run a macro every 15 minutes after opening it. I did read something on here that helped me "http://www.ozgrid.com/Excel/run-macro-on-time.htm", but it only seemed to refresh at 15 minutes past the hour. Not at 00:30, 00:45, or 00:00.
View 2 Replies
View Related
Jan 16, 2009
Attached is the file wherein I am trying to make the scheduling gantt for UAE calendar where the weekends are Friday and Saturday. I am not able to format sundays as workdays some how through my conditions.
View 2 Replies
View Related
Nov 28, 2008
I have columns with the dates on the top, and staff listed on the rows to the left of the speadsheet. I must have 4 H's (indicating a base location), and 4 F's (indicating another base) in the column below the date. I want to have a cell, just above the date which will highlight red if there are any less than 4 H's and 4 F's. If there are 4 H's and 4 F's in the column (indicating full staffing levels), then I want the same cell to turn green, indicating that the day is OK. The red highlight would be a quick scan for supervisors to look at and see if we are deficient on staffing, and will prompt us to look for people who can be the missing H or F.
View 3 Replies
View Related
Feb 14, 2007
I have a table like the one below:
Day Night
2/26/2007DC
2/27/2007AB
2/28/2007AB
3/1/2007 CD
3/2/2007 CD
3/3/2007 BA
3/4/2007 BA
Each letter represents a 12 hour shift (ex. D team has 36 hours for the week). If I need coverage on 2/27/07 on the day shift, I need to find a team that is working 36 hours for that week and was not scheduled to work the shift before or the shift after. (Example, on 2/27/07 A team needs coverage. The only teams working 36 hours are D and C. C team work the previous shift. So the code would input D in a cell).
View 4 Replies
View Related
Feb 15, 2007
Is there a way to set the ontime application to run even when excel is turned off? I'd like to be able to refresh a data table every morning at 6:30, even if excel is not on. Ideally, if even my computer isn't on. The code below works, but only if the sheet is open to the exact worksheet.
Option Explicit
Public RunWhen As Double
Public Const cRunWhat = "The_Sub"
Sub StartTimer()
RunWhen = TimeValue("09:54")
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
Sub The_Sub()
'my code here
StartTimer
End Sub
View 2 Replies
View Related
Dec 20, 2008
I have found some posts about "Auto Saving" and Dave pretty much frowns upon that. But the program I use (via ODBC), for some reason doesn't see the changes I make unless the file is saved. I have it auto-saving right now, but was thinking, maybe it is better to export a copy.
What I would need, is the ability to take my current workbook and export it to a new file (overwriting that same file each time), and do this based on time or (even better) on a change in the data. My current workbook is set to pull from other CSV files, scraping our website, etc., and then I use Excel to format the data the way I want.
It would be cool, if I could export two versions each time too... one that would be like a archive of what the file was like when it changed, the other would be the one that just gets overwritten each time.
Love this site...tons of info...but dang am I not smart at this stuff. Half the time, I don't even get where to put the code...worksheet, module, workbook?
View 6 Replies
View Related
Jun 11, 2009
I have a spreadsheet and a macro that creates a new sheet and enters some data into the sheet. The user gets to make some changes to the created sheet and then prints it out. I was wandering if there was any way to have a message coming up every 10 minutes remindnig the user about the new sheet untill it was printed out and then the warnings would stop. Could anyone sugest a good way to do that?
View 7 Replies
View Related
Nov 3, 2009
- I have 2 checkboxes and I need run macro, if one of this checkboxes are checked (if checkbox1 then run macro, if checkbox2 then run macro2)
- If this checkbox is checked run macro every "xy" minutes, and this "xy" is written in cell I1 (for checkbox1) or I2 (for checkbox2)
I add my excel for better understanding
View 11 Replies
View Related
Sep 13, 2007
Macro to save the worksheet every 5min
A macros is needed to:
1. save the worksheet under the same name
(& variation: under diff name - e.g. quotes_HHMM.xls ,
where HH is hour and MM is minutes of the time the file is saved)
2. every 5 minutes (the file is opened at 9AM and closed at 6PM manually)
I have a file, where the financial data is streamed in from Reuters.
View 7 Replies
View Related
Feb 21, 2008
i have a cell in a specific workbook which i intend to update it using a macro every min. but during the interval, i might look at other excel files. thus, i hope the macro of that file can run at background.
View 3 Replies
View Related
Sep 26, 2006
I have a scheduling problem that I'm trying to get my head around. Im sure that some kind person can give me some ideas on how to get this started. It may be extremely easy, but I just cant get it off the ground. Basically I have 15 doctors that work for me - 9 full time (38hrs/week) and 6 part time (15+hrs/week) in a general practice. We are open 7 days a week
Open Close
Monday8:3019:00
Tuesday8:3019:00
Wed8:3019:00
Thur8:3021:00
Fri8:3019:00
Sat9:0018:00
Sun9:0018:00
Doctors have 5 days on and then 2 days off.
The below is the proposed daily schedule and the doctor requirements. % of booked patients for the times and % of random patients for the times are included as well as average waiting times.
Booked Random Waiting Doctors
8:30 - 10:00Morning Hours55%45%30min5-7
10:00 - 13:00Increasing80%20%45min7-8
13:00 - 18:00Busy 100%01.5hr8+
18:00 - 19:00Decreasing70%30%1hr6-7
19:00 - 21:00Night 40%60%30min5+
There are 3 types of patient visits
ShortDoubleTriple
%0.810.140.05
Minutes153045
58% of patients choose their doctor and 42% come in off the street and will take the first available doctor.
and finally - doctors cant work for more than 4 hours without a break. brek details are below
HoursBreak
<4hrs0
4 - 5hrs10min
5 - 8hrs2*10 mins - 45min lunch
8+2 * 10min 2*45min lunch
I need to create a timetable for the doctors which optimises their time based on the above details. I also need to design a data sheet for reception which will maximise the number of patients seen. Finally I need to calculate what the maximum number of patients the centre can see on an average day say monday.
View 9 Replies
View Related
Sep 23, 2008
The below seems to work but I'm wondering if there might be a better way. I'm trying to keep an ongoing up-to- date and accurate time. my code is as follows:
Private Sub Workbook_Open() ' placed inside thisworkbook
Call TimeUp
End Sub
Sub UpdateTime() ' placed in module
If Range("A4") = TimeValue("00:00:00") Then
Application.OnTime Now + TimeValue("00:01:00"), "TimeUp"
Else
UpdateTime2
End If
End Sub
Sub TimeUp()
[a1] = Time
UpdateTime
End Sub
Sub UpdateTime2()
[a1] = Time
Application.OnTime Now + Range("A4").Value, "TimeUp"
End Sub
Does anyone know if there is any way to improve the Code or formulas within the Cells?
View 3 Replies
View Related
Jan 26, 2008
1st post. Very basic understanding of Excel / Macros / VBA but I have searched and still not quite able to get what I'm looking for.
I would like to be able to manually put in a TIME in a cell, and have a macro run at set times before that TIME e.g. something like
If TIME in cell A1 =(hh:mm minus 30mins) run macro 1,
If TIME in cell A1 =(hh:mm minus 5mins) run macro 2
It was suggested to me to use vba code that would constantly check the time against the system time and as soon as it is 30 mins before the time in cell A1 and the 30 mins flag in cell B1 was ‘N’ then it would run macro 1 code and set the 30 mins flag to ‘Y’ to show that macro 1 had been run.
and that this could also do the same for the 5 mins event
View 4 Replies
View Related
Jul 4, 2007
I have a worksheet which I am trying to format as a template which includes inputting start times and end times of work and calculating how many minutes are taken to do the job. I just can seem to find the correct formula.
View 9 Replies
View Related
May 16, 2014
If i input a 3 in a1 how do i return data in the 3 rows below:
Attached File : schedule2.xlsx
View 3 Replies
View Related
May 4, 2013
I'm trying to come up with an Employee Shift Scheduling template. I have 6 employees total with 3 different shifts (day, swing, graveyard). I would like to not do a rotating shift. I'm trying to figure out if a 5X8 shift is better or 4X10 and I would like to come up with a weekly schedule where I can see what shift everyone is working and were I have double coverage.
View 1 Replies
View Related
Jun 10, 2014
I have 20 staff members that I need to schedule in half day shifts (AM & PM) across three different locations for the month of July.
I want to make sure there is no overlap/duplication for any one staff in a time slot. Nor do I want any one staff member to work an AM and PM shift in the same day.
Ideally, I would also like to avoid back-to-back shifts (e.g., not allow PM on Monday to be scheduled for an AM on Tuesday).
Lastly, I would like to have the number of shifts be be as equitably distributed across all of the staff members as well.
Any way that I can do this in Excel?
View 1 Replies
View Related
Apr 13, 2006
I have a macro that I want to run on an hourly basis, say at 9am, 10am, etc whenever the workbook is open. This needs to be definable as I have several users that will be conducting the same activity throughout the day. In other words I want the macro to run on the hour for user 1, quarter past the hour for user 2, half past for user 3 and quarter to for user 4. Each user does have their own unique macro to run so it should (hopefully) just mean introducing a line of code to each, defining the time to run.
View 4 Replies
View Related
Oct 4, 2007
I have an excel spreadsheet that contains customer data exported from Quickbooks. In that file there is a column called CType (Column G) which contains the scheduling cycle for that customer. There are eleven different possible schedules, including 15xYr, 1xMo, 2xMo, EOM (every other month), EOW (every other week), EOW-S / 1xMo-W (every other week between 5/1 and 10/31 and once a month during the rest of the year), EOW-Th (every other week but must be on a Thursday), ETW (every third week), On Call, W, Q.
Although the number of records changes daily, on average there are about 950 rows of data in the spreadsheet.
I need to set up an array (?) for the values in column G starting with G2 through the last non-blank row (all records will have data in column G), and calculate the next scheduled service date based on the schedule type shown in column G and the last service date which will appear in column M of that row. The last thing I need to consider is whether there is a value in Column N, which would represent a hard-entered ‘Next Scheduled Service Date’. If I find a date in that column it needs to over-ride the calculated value. My assumption to this point is that I should use a new column T to hold the value of the calculated schedule date. There are a few other details, but rather than confuse this whole thing further I’ll stop there.
What I’m struggling with is the most efficient means of running this macro. I’ve been looking at many, many threads over the past few weeks, reading
VBA Programming for Dummies (which I apparently am), and reviewing other resources.
View 3 Replies
View Related
Apr 9, 2008
I am wanting to have a schedule posted as 8:00am to 5:00pm to show up in a format that shows the interval every thirty minutes with either a 1 or a zero so that I can calculate each intervals total staffing. Also if a break or lunch is entered I would like it to show a zero or .5 in the field (.5 being for 15 mins and 0 for anything taking the full 30 mins).
View 3 Replies
View Related
May 30, 2014
So I'm having a problem trying to make this scheduling sheet.. What I did was row a would be the employee list then b,c,d and so on are mon-sun Originally in b1 I would put like 9am-5pm and c1 8-4 and so on and in row i I put the total and added a sum function but somehow it wasn't able to calculate. So then I redid the whole thing this time in row b1 i put 9am and c1 5pm and so on and again I put the total and added the function and it still came out wrong..
View 2 Replies
View Related
Apr 22, 2006
I need to dispatch 10 technicians across the US starting each Monday. They go to 10 different customers for the whole week. I know the distance between each technician and each customer. What I would like to do is assign each technician to a customer so that the total distance traveled for all the technicians is minimized. I know that if it was only 3 techs and 3 customers (as an example), I could build a table of all the possible combinations (3 factorial or 6 permutations), determine the distance for each permutation and select the minimum. I'm not sure that doing this method with 10 techs is feasible as the number of permutations is 10 factorial or over 3 million possibilities. Anyone see a workable solution?
I've include a spreadsheet with customers, technicians and the distances between them!
View 9 Replies
View Related
Feb 14, 2007
I'm trying to create an Employee Scheduler. I want my employees (1 technician per row for a total of 10 rows) in the 1st column then the monthly calendar to the right (1 cell/day). That is what you'll see when you open the worksheet. Then, down below I set up my Data Area where I input my project, start date, end date, technician (where each tech is assigned a unique number), and other data across a row of cells. This could be infinite (or at least up to the very last row).
I modified a free Project Scheduler I got from XL-EasyGantt to become my Employee Scheduler but am having some difficulties getting it to do what I want. The project Scheduler basically works by entering (on the same row) the project (or task), the start date and finish date and then the cells get automatically filled in across those dates. This allows for overlapping of tasks but I want to create an Employee Scheduler so it doesn't allow overlapping or schedule a technician to start a new project before he/she has completed the one their on.
The main function which is in each cell of the monthly calendar is as follows: =IF(OR(AND($G28>=K$4,$G28<L$4),AND($M28>=K$4,K$4>=$G28)),IF(AND($E11="x",$M28>=K$4,$M28<L$4),"x",IF($E11=".",".","..")),"")
My problem: I want to be able to look at the Main Schedule and see when each Technician is scheduled for a job (or multiple jobs) for any given month. I want the function to look in my Data Area and assign the start date and end date of a project and the corresponding technician number and fill in the date cells across from their name in the Schedule above.
View 6 Replies
View Related