Results 1 to 12 of 12

format of date after array resort - one date refuses to play ball

Threaded View

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    format of date after array resort - one date refuses to play ball

    Hi
    The following code lifts data from a sheet and via an array resorts copies it back the same sheet. The date is in the correct format "11/07/19" before macro is run

    with ws1  
     MyArr = .Range("a1:h" & Lrow).Value
       .UsedRange.ClearContents
       .Columns(3).NumberFormat = "dd/mm/yy"
       For i = 1 To 6
          Cells(1, i).Resize(UBound(MyArr)).Value = Application.Index(MyArr, 0, Choose(i, 1, 6, 5, 3, 4, 7))
      Next i
    End With
    The dates are returned to column 3 and even though the column is formatted to date and the code specifies the date format our friend above resolutely returns as "07/11/19"

    No other dates seem affected

    Any ideas
    Last edited by nigelog; 07-31-2019 at 09:35 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formatting a date that refuses to change
    By learn4life in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2019, 04:42 PM
  2. [SOLVED] Array to range with date format
    By jaryszek in forum Excel General
    Replies: 8
    Last Post: 11-28-2017, 04:18 AM
  3. Array to range with date format
    By jaryszek in forum Excel General
    Replies: 1
    Last Post: 11-28-2017, 03:49 AM
  4. [SOLVED] Function to resort selected entries in table by date
    By leovfx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2017, 03:52 AM
  5. Replies: 2
    Last Post: 04-26-2017, 08:06 AM
  6. When transposing an array the date format changes
    By sungsam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2011, 11:47 AM
  7. Excel REFUSES to Listen to me regarding Date formatting
    By Phil_V in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2008, 10:28 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