+ Reply to Thread
Results 1 to 9 of 9

real time countdown timer function with ticker

  1. #1
    Registered User
    Join Date
    08-23-2008
    Location
    SLC UT
    Posts
    5

    Talking real time countdown timer function with ticker

    Hi everyone I need some help on a macro, This should be an easy one for you guys.


    The low down:

    I'm playing a game that requires me to keep track of money that is increased by a variable amount (pre-calculated and in a cell) and in a fixed time interval of 51 minutes weather I play it or not so I want to be able to keep track of the progress of the money gain outside of the game.

    So, I need to know the macro coding for a real time counter that will increase the total money amount in one cell based on the variable income (declared in another cell) in the 51 minute intervals.

    now... I also need excel to keep track of the value increase even if excel is closed (by the difference in time from when excel was closed last).

    Keep in mind I'm a total n00b when it comes to excel and programing so please be as clear and precise as possible with the instructions. I have been trying to figure it out myself and so far I have been able to get a real time clock in a cell, and also the coding to translate time to decimals but I have yet to find a counting function in a timed interval so your help would be greatly appreciated.

    Thanks.
    -Scott
    Last edited by mrhzoer; 08-23-2008 at 03:22 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Scott,

    Welcome to the Forum!

    As a new member please read the rules for posting. Your title is very vague and not very helpful to others who may be searching for the same information. The rules will tell how to do this. If you still have problems, post back and let me know. A suggestion for your title would "How to create a real time counter".

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    08-23-2008
    Location
    SLC UT
    Posts
    5
    Sorry Leith.... won't let it happen again. Thats certainly understandable to help others out with the same questions. I changed the title and made it more descriptive.

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning mrhzoer

    ...and welcome to the forum!!

    There seems to be a couple of questions in here, but none of them are that clear - It all sounds pretty do-able and I can kind of see where you want to go but not what you;re asking.

    Can we take one question at a time, if necessary post the code you have (lease use the code tags above - the # button) and we'll see if someone can help.

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  5. #5
    Registered User
    Join Date
    08-23-2008
    Location
    SLC UT
    Posts
    5
    sounds good dominicb...

    So I have the following code that I have been working with, It initially displayed the current time every 5 seconds in 4 descending cell rows.

    I am trying to change the output to a number instead of time, and keep the value increase in the same cell (A2) and have the value increase by 1 in each of the 5 second intervals.


    Please Login or Register  to view this content.

  6. #6
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi mrhzoer

    You want the code amending so that the value will always be shown in A2, and rather than the time being shown, it is a number that increments by 1 every 5 seconds? If that's the case, does thiw work OK for you? Just bear in mind that before you run it you'll have to change the format of cell A2 from Time to something else - General or Number would be fine. the code could benefit from other tidying up, but we'll stick with the basics first :
    Please Login or Register  to view this content.
    HTH

    DominicB

  7. #7
    Registered User
    Join Date
    08-23-2008
    Location
    SLC UT
    Posts
    5

    Thumbs up

    dominicb Many Thanks! This is brilliant and a Huge Help!

    It was exactly what I was looking for... but I just need a few modifications. Is it possible have the code running 24/7 and keep counting up even with excel closed and the computer turned off? (i.e. Link it to the computers internal clock and update and run automatically where it left off when you open excel again).

    Also whats the code for unlimited (for unlimited # of calls)? and is it possible to make a "reset to zero" button that is linked to the counter?

  8. #8
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi mrhzoer

    Quote Originally Posted by mrhzoer
    Is it possible have the code running 24/7 and keep counting up even with excel closed and the computer turned off?
    and is it possible to make a "reset to zero" button that is linked to the counter?
    Cripes!! You don't want much, do you ...

    Have a look at the attached file. I've made a complete departure from your code in an effort to tidy the whole thing up. It also starts automatically when the file is opened - that's something I got a bit carried away with, but easy enough to change. When the file is closed, the time and date is written to A3, then when the file is next reopened the difference between the actual time and the timestamp is calculated and converted to seconds and the counter should be updated accordingly, but not had chance to do much testing on it.

    HTH

    DominicB
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-23-2008
    Location
    SLC UT
    Posts
    5

    Talking

    dominicb...

    PERFECT PERFECT PERFECT!!!! your amazing! Many Many Many thanks!!!!!!



    I think this will help out a lot of people as well. Let me know if you ever need something from photoshop, flash, or maya and I'll get you the hookup.

    -Scott

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Not Counting Zeros With Rank Function
    By kingsolo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-24-2008, 04:04 AM
  2. Requesting a simple counting function, pretty urgent (VBA)
    By ssdt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2008, 08:47 PM
  3. IF function yet want to stop counting when another cell has data entered.
    By Stevie-B in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2008, 09:28 AM
  4. LEFT or RIGHT function but counting whole words
    By Badvgood in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-04-2007, 10:31 AM
  5. Counting function with 2 sets of variables
    By jalum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2007, 03:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1