User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Excel Time Question Page [1]  
dzags18
All American
5694 Posts
user info
edit post

Trying to make an excel document that has a button that when you click it generates the current time in military time (ideally with seconds) in another cell. Any ideas?

3/18/2011 1:43:37 PM

Madman
All American
3412 Posts
user info
edit post

1) Make a cell with the following formula:
=now()
2) Change the cell number format to Custom:
m/d/yyyy hh:mm:ss
3) Record a macro in excel, call it "refresh_cell". While recording, click on the formula bar of your =now() cell and simply hit enter. This refreshes the cell. Stop recording
4) Create a VBA button that calls the "refresh_cell" macro upon clicking



[Edited on March 18, 2011 at 2:12 PM. Reason : .]

3/18/2011 2:10:17 PM

dzags18
All American
5694 Posts
user info
edit post

Ah thanks. Yeah I ended up figuring it out and just made something similar, rather then a button its just a keyboard command. But I probably will change it to a button for the others that will use it, they would probably prefer that.

3/18/2011 2:50:40 PM

dzags18
All American
5694 Posts
user info
edit post

Got a new one - sorry i'm really bad with excel.

Basically I'm making something to log calls for work. I have a basic screen set up to collect the information and a macro set up to reset it and start from scratch. What I would like to do is set up a macro that will copy all the cells and paste them into a different work book. I've figured that much out - but what I want it to be able to do (if possible) is when you hit the macro again it copies the next call into the 2nd workbook below the first. Right now it just copies it on top of the first. Any suggestions?

3/18/2011 3:32:57 PM

Madman
All American
3412 Posts
user info
edit post

I'm going to wait a couple of days to see if you don't figure this one out, too, so I don't waste my time.

3/18/2011 3:34:32 PM

rbrthwrd
Suspended
3125 Posts
user info
edit post

^^ do you have access? access has a call log template with everything already setup to do what you want to do and will probably work better than trying to use excel as a database program

3/18/2011 4:06:42 PM

dzags18
All American
5694 Posts
user info
edit post

To be fair, you didn't waste your time. I ended up using your way to clean it up, my way wasnt working 100% of the time, so it did help quite a bit

^And no, we dont have access. We are using office 2003

[Edited on March 18, 2011 at 4:50 PM. Reason : a]

3/18/2011 4:50:26 PM

AVON
All American
4770 Posts
user info
edit post

I have Access 2003, which came with Office 2003.

3/19/2011 9:34:51 AM

Chance
Suspended
4725 Posts
user info
edit post

You literally want new workbooks (these are individual .xls files) or new worksheets? Paste your code so far.

[Edited on March 19, 2011 at 1:55 PM. Reason : .]

3/19/2011 1:55:33 PM

 Message Boards » Tech Talk » Excel Time Question Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.