Results 1 to 11 of 11

Compiling info from two types of surveys

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-18-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    139

    Compiling info from two types of surveys

    Hey guys,

    I want to compile the information from a survey (10k surveys).
    There are two types of surveys with just 1 sheet.

    I have put all the surveys in a folder and this is the macro I will use to run it on all files
    Sub ProcessFiles()
        Dim Filename, Pathname As String
        Dim wb As Workbook
        
        Pathname = ActiveWorkbook.Path & "\Files\"
        Filename = Dir(Pathname & "*.xls")
        Do While Filename <> ""
            Set wb = Workbooks.Open(Pathname & Filename)
            DoWork wb
            wb.Close SaveChanges:=True
            Filename = Dir()
        Loop
    End Sub
    
    Sub DoWork(wb As Workbook)
        With wb
    
              MACRO
    
        End With
    End Sub
    I tried completing the copy part but couldn't make it work.
    What I need the macro to do is:
    If the worksheet on the survey is called First -> Copy content from C6 to Column B on the combined workbook, copy content from B6 to column C, and then copy for each row the range of B:C, one next to another on the combined workbook. For example B10:C10 to columns D:E, B11:C11 to columns F:G, B12:C12 to columns H:I. There are like 50 questions. The last row is 257 (there are hidden rows, that I don't need copied).

    If the worksheet on the survey is called Second -> Copy content from B3 to Column B on the combined workbook. Then copy content from B to column C on the combined workbook, and range column C:P to DD:DQ on the combined sheet. And do that on all rows because this Survey B will have multiple rows filled.

    Any help will be greatly appreciated.

    I have attached the files in case you want to see how it will look like.

    Thank you very much in advance!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 08-22-2013, 01:05 PM
  2. Replies: 0
    Last Post: 12-03-2012, 04:21 PM
  3. Surveys in Excel
    By dasadler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-13-2007, 05:15 PM
  4. surveys on use of Excel
    By starguy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-31-2006, 08:20 AM
  5. surveys on use of Excel
    By starguy in forum Excel General
    Replies: 0
    Last Post: 10-31-2006, 08:17 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