Consulting

Results 1 to 2 of 2

Thread: Import selected cells from multiple WB's to 1

  1. #1

    Import selected cells from multiple WB's to 1

    I am working on a project that will require me to extract data from over 300 workbooks, looking for a simplified solution for extracted the data and compiling onto one new file. All workbooks are located at C:\Documents and Settings\af91468\Desktop\Inspections and I need to extract data from cells B1 through H27 (large range due to merging) I actually need the data from these cells specifically though a range will also work (B1:B6 AND B22:B27) Also some of this data will be the result of a formula. I am attaching a sample of the workbook that I need to extract. Any help would be awesome
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    Compiling How ???

    [VBA]
    sub M_snb()
    for each it in split(createobject("wscript.shell").exec("cmd /c Dir C:\Documents and Settings\af91468\Desktop\Inspections\*.xls" /b").stdout.readall,vbCrLf)
    with getobject(it)
    thisworkbook.sheets(1).cells(1,columns.count).end(xltoleft).offset(,1).resi ze(27)=.sheets(1).range("B1:B27").value
    .close 0
    end with
    next
    End Sub
    [/VBA]

Posting Permissions

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