+ Reply to Thread
Results 1 to 5 of 5

Where is a sample formula for retrieving the system date?

  1. #1
    Artemis
    Guest

    Where is a sample formula for retrieving the system date?

    Hello:

    I am very new to coding and would appreciate some guidance. Does anyone
    know or are there any sites which give sample code for VB in Excel and most
    specifically having a spreadsheet "pull" the system date. I am going to
    University plus working for accounting firms, so don't know where to search
    on begin on looking to have a macro which displays the date code. Also, is
    there any code for counting say to put an invoice number on a spreadsheet.
    Thanks for all of your help.

    --
    Enjoy learning everything possible in life.

  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 Artemis,

    You can return the system date and time by [lacing the formula below in a cell on your worksheet

    =NOW()

    As for the rest of question, there is a plethora of books on using Excel as well as writing macros. First you need to learn the basics of a spreadsheet, learn where and how to use the help files, and finally move on to more advanced topics.

    Sincerely,
    Leith Ross

  3. #3
    Dave Peterson
    Guest

    Re: Where is a sample formula for retrieving the system date?

    Leith gave you a function for date and time.

    =today() gives the date.

    You can also use a short cut key to put the current date in a cell:
    ctrl-; (control-semicolon)

    ctrl-: (control-shift-semicolon or control-colon)
    will give the time.

    The formulas
    =today()
    =now()
    will change when the date/time changes (and the workbook recalculates)



    Artemis wrote:
    >
    > Hello:
    >
    > I am very new to coding and would appreciate some guidance. Does anyone
    > know or are there any sites which give sample code for VB in Excel and most
    > specifically having a spreadsheet "pull" the system date. I am going to
    > University plus working for accounting firms, so don't know where to search
    > on begin on looking to have a macro which displays the date code. Also, is
    > there any code for counting say to put an invoice number on a spreadsheet.
    > Thanks for all of your help.
    >
    > --
    > Enjoy learning everything possible in life.


    --

    Dave Peterson

  4. #4
    No Spam
    Guest

    Re: Where is a sample formula for retrieving the system date?

    Leith's excellent advice notwithstanding, a useful primer on Excel
    macros and VBA is:

    "VBA and Macros for Microsoft Excel" by Jelen and Syrstad, published
    by Que. Try visiting www.MrExcel.com.

    /Cal/


    On Sun, 29 Jan 2006 15:50:27 -0800, "Artemis"
    <Artemis@discussions.microsoft.com> wrote:

    >Hello:
    >
    >I am very new to coding and would appreciate some guidance. Does anyone
    >know or are there any sites which give sample code for VB in Excel and most
    >specifically having a spreadsheet "pull" the system date. I am going to
    >University plus working for accounting firms, so don't know where to search
    >on begin on looking to have a macro which displays the date code. Also, is
    >there any code for counting say to put an invoice number on a spreadsheet.
    >Thanks for all of your help.
    >
    >--
    >Enjoy learning everything possible in life.


  5. #5
    David McRitchie
    Guest

    Re: Where is a sample formula for retrieving the system date?

    Hi Artemis,
    Dave Peterson gave you answers using worksheet formulas, the formatting
    of the date relies on your system short date (Control Panel). You can modify
    the format from that default.

    But I expect the your question really concerns use in VBA, so you would
    want to look up DATE from the Visual Basic Editor (VBE) in HELP from there.

    More information on Date and Time can be found in
    http://www.mvps.org/dmcritchie/excel/datetime.htm
    http://www.cpearson.com/excel/datetime.htm

    In rereading the question, you definitely asked about VB, so the subject does
    not match the question. Asking questions takes quite a bit of effort to ask a
    question and get an answer the first time that is one that would work best for you.
    If you asked for a specific format for instance you would get a specific answer.

    Since you are taking Excel in University you certainly should be familiar with the
    many excellent Excel tutorials available online to anyone.
    http://www.mvps.org/dmcritchie/excel....htm#tutorials
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Artemis" <Artemis@discussions.microsoft.com> wrote in message news:F51EB7C6-4D63-4287-AB12-B3F4AD03CC88@microsoft.com...
    > Hello:
    >
    > I am very new to coding and would appreciate some guidance. Does anyone
    > know or are there any sites which give sample code for VB in Excel and most
    > specifically having a spreadsheet "pull" the system date. I am going to
    > University plus working for accounting firms, so don't know where to search
    > on begin on looking to have a macro which displays the date code. Also, is
    > there any code for counting say to put an invoice number on a spreadsheet.
    > Thanks for all of your help.
    >
    > --
    > Enjoy learning everything possible in life.




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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