+ Reply to Thread
Results 1 to 7 of 7

Date/Time Macro Issue

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Date/Time Macro Issue

    I have the below which generates an email if the date in column D is in the past. I am going to alter column D so that it contains a date and a time and the column is format dd/mm/yyyy hh:mm:ss and so then I'd only want the macro to run if what is in column D is in the past.

    Any help?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Date/Time Macro Issue

    use now instead of date
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Date/Time Macro Issue

    I used now nathan but for some reason the date and time are displaying as a huge number like 418660.895833333333 in the column so I assume that's what's stopping it from working?

  4. #4
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Date/Time Macro Issue

    Should I be using something like CDate or similar in my code to make it work?

  5. #5
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Date/Time Macro Issue

    Perhaps it is how I am using column D. It is a formula which is 'Exx&Fxx' where xx is the row number. Column E is a date and Col F is a time.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,987

    Re: Date/Time Macro Issue

    You should be using + not & in the formula.
    Everyone who confuses correlation and causation ends up dead.

  7. #7
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Date/Time Macro Issue

    Sorted now guys. Thanks for the help

+ 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. Issue with Date-Time comparisons
    By excelnovice1010 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-08-2013, 09:06 AM
  2. Date/Time Reference Issue
    By jakesing in forum Excel General
    Replies: 6
    Last Post: 05-10-2012, 08:35 PM
  3. Date & time formats issue
    By Redder Lurtz in forum Excel General
    Replies: 2
    Last Post: 12-02-2009, 04:14 AM
  4. Date time issue
    By Flash in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2006, 08:05 AM
  5. [SOLVED] Mac issue with macro recording user login & date (run time error '
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-01-2005, 01:05 AM

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