Results 1 to 7 of 7

vba copying dates from csv file

Threaded View

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    57

    vba copying dates from csv file

    Hi
    Can anyone help me with my code , I am copying data from a csv file and pasting it into an existing workbook, However the date column which should be dd/MM/yyyy some of them switch day and month.
    I have attached an example highlighted in yellow in the date column. Here is my coding below Many thanks


    Sheets("MENU").Select
    Workbooks.Open Filename:="G:\Catalyst\CAT_D_monthlyfundperformanceMTD_" & Format(Range("c4"), "yyyymmdd") & ".csv"
    Range("a2").Select
    Range(ActiveCell, ActiveCell.End(xlDown).End(xlToRight)).Select
        Application.DisplayAlerts = False
        Selection.Copy
        ActiveWorkbook.Close
        Application.DisplayAlerts = True
        Sheets("Maitland Daily Performance").Activate
        Range("B2").PasteSpecial
        Columns("D:D").Select
        Selection.TextToColumns Destination:=Range("D1"), DataType:=xlDelimited, _
            TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
            Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
            :=Array(1, 4), TrailingMinusNumbers:=True
        Sheets("MAP").Select
    Attached Files Attached Files
    Last edited by grimston; 10-31-2019 at 11:59 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pivot table cycle through and copying to new file and unique file name
    By moocow77 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2019, 02:52 AM
  2. Replies: 1
    Last Post: 12-17-2014, 08:14 PM
  3. Replies: 7
    Last Post: 10-18-2013, 04:46 PM
  4. Create save as new file for each row by copying all rows from another excell file
    By snsuvarna in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2013, 09:17 AM
  5. Copying file but receive an Run-time error'53' - File not found
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2013, 06:40 PM
  6. Macro that helps copying filtered data in file A and paste to file B ?
    By achimeda in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2013, 02:14 AM
  7. [SOLVED] When copying dates to another sheet the dates are different
    By Kelly C in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2005, 09:06 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