Results 1 to 10 of 17

Thread: Collate Data from csv files to excel sheet

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Junior Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Red face

    Not too many rows. You can try if you wanted to. I am attaching the folder zipped.

    How about a simple approach like:

    Code:
    ub ActivateASheet()
    Dim SShtName As String
    Dim Wbk As Workbook
    Dim Ssheet As Worksheet
    
    For Each Wbk In Application.Workbooks
    On Error GoTo Done
    Wbk.Activate
    On Error Resume Next
    SShtName = Sheet1.Range("A1")
    Set Ssheet = Sheets(SShtName)
    If Not Ssheet Is Nothing Then
    Ssheet.Activate
    Exit Sub
    End If
    Next Wbk
    
    Done:
    ThisWorkbook.Activate
    End Sub
    Can you tweak it to work for my scenario.

    Thanks,
    Dhiraj
    Attached Files Attached Files

Similar Threads

  1. Macro To Close All CSV Files
    By Howardc in forum Excel Help
    Replies: 5
    Last Post: 03-15-2014, 05:24 PM
  2. export all worksheets to separate csv files
    By rabidfly in forum Excel Help
    Replies: 4
    Last Post: 11-18-2012, 02:11 PM
  3. Macro to copy data from a set of excel files
    By Sreejesh Menon in forum Excel Help
    Replies: 5
    Last Post: 11-15-2012, 11:17 AM
  4. Excel to Excel Data transfer without opening any of the files(source or target)
    By Transformer in forum Excel and VBA Tips and Tricks
    Replies: 14
    Last Post: 08-22-2012, 10:57 AM
  5. Macro to export sheet as CSV
    By Howardc in forum Excel Help
    Replies: 2
    Last Post: 07-25-2012, 08:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •