enter time into file for a time sheet

how can I enter the time automatically into a cell.
perhaps a macro. hilte the cell and hit your macro or 
enter?
I want to round the time to the nearest 1/4 hour.
I also want to be able to override the automatic function
0
awm (6)
10/5/2003 10:20:49 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
700 Views

Similar Articles

[PageSpeed] 40

The quick way to enter current time is Ctrl plus the colon (date is Ctrl
plus semi-colon) but this doesn't round to the nearest 15 minutes.  I think
there is an add-in that would do that as a worksheet function.  Here is a
subroutine that might do what you want:

Sub RndToQtrHr()
Dim currMin As Long
Dim M As Long
Dim plusHour As Boolean
currMin = Minute(Time)
plusHour = False
If currMin < 7 Then
  M = 0
ElseIf currMin < 22 Then
  M = 15
ElseIf currMin < 37 Then
  M = 30
ElseIf currMin < 52 Then
  M = 45
Else
  M = 0
  plusHour = True
End If

If plusHour = False Then
ActiveCell.Value = Format$((TimeSerial(Hour(Time), M, 0)), "H:MM am/pm")
End If

If plusHour = True Then
ActiveCell.Value = Format$((TimeSerial(Hour(Time) + 1, M, 0)), "H:MM am/pm")
End If

End Sub



"Kirk" <awm@cyberport.net> wrote in message
news:09c701c38b8e$ee0d93f0$a101280a@phx.gbl...
> how can I enter the time automatically into a cell.
> perhaps a macro. hilte the cell and hit your macro or
> enter?
> I want to round the time to the nearest 1/4 hour.
> I also want to be able to override the automatic function


0
syandl (24)
10/6/2003 12:49:53 AM
Reply:

Similar Artilces:

Chart of Times
I am working with a simple data set comprised of two columns and 24 rows. In column ("A"), I have the numbers 1-24. In column B, I have these random times: 4:57 5:16 2:17 1:20 1:11 1:21 1:19 1:11 1:37 2:56 3:29 4:09 5:59 5:23 5:22 3:59 4:04 1:51 2:06 2:16 2:08 1:28 1:24 1:24 The chart I would like to make would have the numbers 1-24 on the X- axis and the times listed above on the Y-axis. Ideally, this would be a column chart. My Issue: The times listed in column ("B") are formatted as time. When the chart is created the X-axis an...

Resource file (rc) units
Hello, I am currently trying to port a MFC app to the wxWindows API. My problem is I would like to convert a rc file to the wxwindows resource format but I don't understant units used in MS file. Ex : IDD_LECTEUR_DIALOG DIALOGEX 0, 0, 679, 471 STYLE DS_ABSALIGN | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE EXSTYLE WS_EX_APPWINDOW FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN CONTROL "",IDC_PANEL_CENTRAL,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,5,117,667,236 LTEXT "",IDC_STATIC_PANEL,36,138,593,195,0,WS_EX_...

Downloading Additional program files for Money 2006
I have had to re-download Money 2006 Deluxe to my laptop and said OK to download the additional program files necessary so that I can use Budget and other features. The download is not happening, I have re-booted several times, changed the date back to 2006. What else can I do? I am so frustrated at this point. In microsoft.public.money, Steph wrote: >I have had to re-download Money 2006 Deluxe to my laptop and said OK to >download the additional program files necessary so that I can use Budget and >other features. The download is not happening, I have re-booted several &g...

Excel, horizontal scroll bar and sheets not accessable anymore
I'm using Excel 2000 on Windows XP. After several years use for book keeping the horizontal scroll bar and the numbered sheet tabs have disappeared. Once after re-starting the computer they reappeared but that no longer works. Under Tools, Options, the boxes for show scroll bar and sheets are ticked. Hi does this happen only for one single file or for all Excel files? -- Regards Frank Kabel Frankfurt, Germany Cassandra wrote: > I'm using Excel 2000 on Windows XP. After several years use for book > keeping the horizontal scroll bar and the numbered sheet tabs have > disa...

Why is Actual Work updated when entering time into Work Field?
We're using MS Project 2007 and seeing that sometimes when time is entered into the Work field for a task, that task's Actual Work is updated to the same value entered in the Work field. This happens to multiple resources, but only on some of their tasks and not on others. For example, for the weeks of 1/24 and 1/31, whatever hours I schedule (enter in the "work" cell in the Resource Usage View) for a given task also appears in the "actual" cell. The tasks are setup up differently. Some are Fixed Work, some are Fixed Duration. I believe all have the e...

run time error; can not write to object
in 07 have form w/ onclick event of main form that opens a new form then having text in an unbound control of main form written into a text box on this new form run time error; can not write to object seems be triggered because the new form is opening with no records. the new form is in Date Entry property yes and when I manually open it - it opens to a new blank record....but when opening via the onclick docmd...it opens with no record... am perplexed... GBA wrote: > in 07 have form w/ onclick event of main form that opens a new form > > then having text in ...

Excel 2003 spreadsheet. I enter the any number and it is entered.
If I enter a number into a cell it is put in like a decimal. For example, if I enter 10 it is put in as .1 500 is entered as a 5 Thank you Mary Mary, Goto Tools>Options and on the Edit tab you should see The Fixed Decimal Places box checked. Uncheck it. -- HTH RP "maryu" <maryu@discussions.microsoft.com> wrote in message news:65C0E0FB-43F3-4F34-8A86-FBA3F02EC9B1@microsoft.com... > If I enter a number into a cell it is put in like a decimal. For example, if > I enter 10 it is put in as .1 500 is entered as a 5 > Thank you > Mary ...

Open a Form at a Specific Time
I would like to open a form at a specific time of the day, everyday. Please help? -- Message posted via http://www.accessmonster.com Scheduled Tasks should do what you want. Steps 1. Open Control Panel 2. Look for Scheduled Tasks and double click it. 3. Click Add Scheduled Task then follow the wizard hope that helps User wrote: >I would like to open a form at a specific time of the day, everyday. > >Please help? -- spread the WORD Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201001/1 I'm sor...

OE removes access to certain types of files on e-mails
Grateful for anyone to tell me how I can set Outlook to NOT automatically remove certain types of files eg PDF, HTML, DAT files etc. Are they removing them or blocking them? See http://www.slipstick.com/outlook/esecup/getexe.htm for ways to get the attachments off. For more information on the security features, see http://www.slipstick.com/outlook/esecup.htm If you use OE, hit forward on a message or disable it in tools | options | security. On 25 Apr 2004 02:07, "Sam" <anonymous@discussions.microsoft.com> wrote: >Grateful for anyone to tell me how I can set Outlook ...

Emails Receiving time in Inbox Differs
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: pop Hi, <br><br>I wonder if anyone can help me with this. I realised that my incoming mails received in the in the Inbox, the time received is different from actual time received. Meaning, the timing in the inbox shows the time that I download the emails. IS there a way to resolve this? ...

Service time billing
Can MSCRM be adapted to a service organization that primarily bills for time on an as-provided basis? When resolving a case, I see that the billable time is shown as the total of all activity time. Is this information only used when applied against a contract, or can I invoice for time or export a list of billable time with descriptions for use in Quickbooks? Also, can information, such as usernames and passwords be stored in the account record but secured from users that don't have sufficient privileges? Thank you, Rick S. The actual time is only automatically decremented from th...

File Dialog in access 2007 01-11-10
Im having problems with the following code in access 2007. I'm trying to open a file dialog to place an image into a form. Any help would be appreciated Reghards Rob. Sub getFileName() ' Displays the Office File Open dialog to choose a file name ' for the current id record. If the user selects a file ' display it in the image control. Dim fileName As String Dim result As Integer With Application.FileDialog(MsoFileDialogOpen) .Title = "Select Picture" .AllowMultiSelect = False .Filters.Clear...

Display Worksheet in Excel File
I want to Display the worksheet name on the Excel Spreadsheet itself. ie. On Worksheet1, Cell A1 = Worksheet1 How do I do this without having C:\Desktop\Book1.xls\Worksheet1?? "Rowf" <Rowf@discussions.microsoft.com> wrote in message news:D5E8504E-FE17-4DBF-B7C8-DD65C102383B@microsoft.com... > I want to Display the worksheet name on the Excel Spreadsheet itself. > > ie. On Worksheet1, Cell A1 = Worksheet1 > > How do I do this without having C:\Desktop\Book1.xls\Worksheet1?? You have to make a User Defined Function. Start the Visual Basic Editor, insert a new ...

Excel 2003 - VBA
Hi Guys: I'm drawing a blank and need some help. I have a table with row 3 containing sheet names (currently pointing at 106 sheets). In rows 4-250 I want to put formulas that will look for something (located in Column B) in each of the sheets named in row 3. The first cell in the target sheet contains the last row with valid data. Example: Cell "D3" = P02-05 Cell "B5" = 123456789IBM In cell "D5" I want to generate a formula that will look in sheet P02-05, search for the contents of "B5" throughout the sheet and return the Value in colum...

Modeless property sheet. #2
I have a modeless property sheet. Since it is modeless, I know that I need to have OK and Cancel buttons on the pages... When the operator clicks the close X box at the top right. (Or selects "Close" from the sheet's system menu.) How do I act upon that? ...

Filter records by date in subform by date entered in mainform.
Hello, I've spent 3 days trying to understand what I'm doing wrong.....Here is the summary of my problem. I have a form named 'frm_EfficiencyStats' and a subform within the form named 'qry_Total hours subform' (the subform is based on a query). The form contains a text box (for date) which is bound to a table 'tbl_EfficiencyStats'. I would like to be able to enter a date in the text box on my form, and display the records in the subform based on the date I entered in the text box. The subform will only pull records from my table based on the date. Here are th...

Archiving Money Files #2
Hi all, Whenever I decide to archive old Money data, the process removes the correct dates, transactions, etc. from the main file... But the archived file contains all of the newer transactions as well. I thought an archived file only contained old transactions? EXAMPLE: I just archived the year 2005 from my main file. The main file now shows only transactions dated from 1-1-2006 to now. The archived file contains transactions dated from 1-1-2005 to now. Is this the way Money (I am using Mny 2004) works? In microsoft.public.money, rustyfender04 wrote: > >Whenever I decide ...

Excel Worksheet Change Event in a nick of time
1. Enter an Excel worksheet ; To Define Name > "TagNumber" > ReferTo := D2. 2. Intention ; After TagNumber is updated (in a Change Event), the focus would move to the adjacent cell to the right, Offset(0,1). 3. And therefore, the event procedure is devised as follows ;- Private Sub Worksheet_Change(ByVal Target As Range) If ActiveCell.Address = Range("TagNumber").Address Then Range("TagNumber").Offset(0, 1).Activate End If End Sub 4. However, at run-time ; As soon as Tagnumber is activated, the focus shifts to the adjacent cell to the right alrea...

how to enter simple list and sum
using excel 2002 with an xp sp2 system how would I enter a simple list of positive and negative numbers and then create a cell with the sum of these values? if the list would look like this 0.58 -1.22 1.79 -0.56 -0.92 the output would look something like 0.58 0.58 -1.22 -0.64 1.79 1.15 -0.56 0.59 -0.92 -0.33 John In B1 enter =A1 In B2 enter =B1+A2 Copy down to B5 Gord Dibben MS Excel MVP On Wed, 16 May 2007 06:34:13 +0300, "John" <johnj@multipl.es> wrote: >using excel 2002 with an xp sp2 system >how would I enter a simple list of positive and negative...

calculating times
HEY, DOES ANYONE KNOW HOW TO SET A FORMULA TO CALCULATE THE MINUTES FROM TWO TIME? THANKS, SPIKE Hi not really sure what you're looking for? maybe the function MINUTE is working for you. e.g. =MINUTE(A1) -- Regards Frank Kabel Frankfurt, Germany spike wrote: > HEY, > DOES ANYONE KNOW HOW TO SET A FORMULA TO CALCULATE THE > MINUTES FROM TWO TIME? > THANKS, > SPIKE Hi Spike! Posting in all upper case makes it more difficult to read especially if your first language isn't the one used. To calculate the minutes between times in A1 (earlier time) and B1 (later ti...

Browse file at run time in Integration manager
How can I set up the integration so that the system prompts the user for the file at run time. I do not want the users to edit the integration to point to the right file every single time. Is there a way out? Stacey, You would need to write VBScript code in the Before Integration area. The script would use the FSO (File System Object) to prompt the user for the existing file. You would then need to copy the file to the location your source query expects the file to be. It would also need to be the same name as specified in the source query. Be aware that using this method, you can on...

Find folder within a folder which occurs multiple times in that folder
Hello! i have to find a folder named "Addon" in some folder named "Installers" and store the path of "Addon" folder in a array. but "Addon" folder may occur multiple times in "Installers" e.g. Installers\New Folder\Addon Installers\New Folder1\Addon Installers\New Folder2\Addon I have to store all these path in a array how can i do that? >Hello! i have to find a folder named "Addon" in some folder named >"Installers" and store the path of "Addon" folder in a arra...

excel won't open file
I have a customer who has office 2000 and has done all the updates. when he clicks on a file .xls excel opens but the file does not. no blank document just excel but empty. any help???? Please??? From a previous post: === my first question is: Are you sure the workbook is open? Try window|Arrange|tiled If it shows up, resize by hand and save the workbook. If it didn't show up, Try window|unhide if it appears then, save the workbook. If it really wasn't open, but you can open it via File|Open, Close Excel and Windows Start Button|Run excel /unregserver then Windows Star...

Printing Multiple Receipts at a Time From Journal
Hey guys, Is there a way to print multiple journaled receipts at a time? Say all receipts for a batch or by date or other criteria? Thanks Tom, Not that I've seen. -- = Get Secure! - www.microsoft.com/security You must be using Outlook Express or some other type of newsgroup reader to see and download the file attachment. If you are not using a reader, follow the link below to setup Outlook Express. Click on "Open with newsreader" under the MS Retail Management System on the right. http://tinyurl.com/75bgz ========== "Tom Bombadill" <Genius_pos...

Adding Increments across sheets
is it possible to add an increment of 1 across multiple sheets, fo example, in cell B2 in sheets:1-10 i want to progressively add 1 to th cell so that sheet10:B2 would be 10, Sheet9:B2 would be 9, etc -- Message posted from http://www.ExcelForum.com As a macro??? Option Explicit Sub testme() Dim StartVal As Variant Dim iCtr As Long With ActiveWorkbook StartVal = .Worksheets("sheet1").Range("b2").Value If IsNumeric(StartVal) = False Then MsgBox "Please put starting value in B2 of Sheet1" Exit Sub ...