+ Reply to Thread
Results 1 to 4 of 4

Dates recognised when recording Macro, but not recognised when running it.

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Dates recognised when recording Macro, but not recognised when running it.

    Attached file has a "CSV" sheet, a "RECORDING" sheet (where I created the Macro step by step), and the "Macro" sheet (run through the button).

    The "RECORDING" sheet recognises Cols A and L as dates. Coi M can therefore identify rows where the date in Col L was the day after Col A.

    But when I ran the code ("MACRO" sheet), it did NOT recognise Cols A or L as dates, so the analysis shows everything as "No".

    Code as follows:

    Please Login or Register  to view this content.
    Not come across this issue before, but hope someone has the solution?

    All advise and help received gratefully

    Ochimus150321 Macro Date Issue.xlsm

  2. #2
    Forum Contributor
    Join Date
    09-28-2014
    Location
    harbin,china
    MS-Off Ver
    2007
    Posts
    162

    Re: Dates recognised when recording Macro, but not recognised when running it.

    Hi, Ochimus
    try this codes

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Dates recognised when recording Macro, but not recognised when running it.

    You can use text to columns again in the date range to convert the date ranges to dates.

    Here is you workbook in action
    https://www.youtube.com/watch?v=31bAererKCc

  4. #4
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Dates recognised when recording Macro, but not recognised when running it.

    Many thanks for both prompt answers.

    It's irritating that I actually tried setting Arrays 1 and 12 to "4" yesterday.

    No idea why reformatting works as "Stand Alone" but didn't when it was part of the initial conversion.

    Ochimus

+ 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. [SOLVED] Dates copied from webpage not recognised by excel
    By juansn in forum Excel General
    Replies: 5
    Last Post: 11-08-2013, 06:36 AM
  2. Now() formula not recognised
    By deviaug28 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-27-2013, 05:49 PM
  3. Adding new data to a spreadsheet and not being recognised by a macro
    By amhughes1991 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2013, 06:44 AM
  4. [SOLVED] variable not recognised in embedded macro
    By R..VENKATARAMAN in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-24-2006, 10:00 PM
  5. My first macro - doesnt work - function not recognised
    By James Cornthwaite in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-14-2006, 12:20 PM

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