Results 1 to 18 of 18

Combine different tables in one table from selected files

Threaded View

forfiett Combine different tables in... 02-16-2013, 03:58 PM
JBeaucaire Re: Combine different tables... 02-17-2013, 03:58 AM
forfiett Re: Combine different tables... 02-17-2013, 01:23 PM
JBeaucaire Re: Combine different tables... 02-17-2013, 07:43 PM
forfiett Re: Combine different tables... 02-18-2013, 03:20 PM
JBeaucaire Re: Combine different tables... 02-18-2013, 03:57 PM
forfiett Re: Combine different tables... 02-18-2013, 04:08 PM
JBeaucaire Re: Combine different tables... 02-18-2013, 04:19 PM
forfiett Re: Combine different tables... 02-18-2013, 04:22 PM
JBeaucaire Re: Combine different tables... 02-18-2013, 04:27 PM
forfiett Re: Combine different tables... 02-18-2013, 04:32 PM
JBeaucaire Re: Combine different tables... 02-18-2013, 05:15 PM
forfiett Good evening, Find bellow... 02-19-2013, 01:32 PM
JBeaucaire Re: Combine different tables... 02-21-2013, 03:08 PM
forfiett Re: Combine different tables... 02-21-2013, 03:23 PM
JBeaucaire Re: Combine different tables... 02-21-2013, 03:45 PM
forfiett Re: Combine different tables... 02-21-2013, 03:56 PM
JBeaucaire Re: Combine different tables... 02-21-2013, 06:07 PM
  1. #1
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Italy
    MS-Off Ver
    Excel 2010
    Posts
    162

    Lightbulb Combine different tables in one table from selected files

    Hello everyone,

    I just need your help in making my macro code better to do it work like I need.

    My code
    Sub OPS()
    
    Workbooks.Open ("C:\Company\" & Sheets("template").Range("B3").Value & ".xlsm")
    
    
    Range("C16:O1000").copy
    Windows("OPS.xlsm").Activate
    Sheets("Sheet1").Select
    Columns(1).SpecialCells(xlCellTypeBlanks)(1, 1).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
    Workbooks.Open ("C:\Company\" & Sheets("template").Range("B3").Value & ".xlsm")
    ActiveWorkbook.Close False
    Sheets("Load list template").Select
    
    End Sub
    What actually does these code:
    1. it has to open the file from selected folder...name of the file is in cell B3
    2. select range and copy it
    3. past only values in the last empty row in column A of the origin workbook - OPS.xlms
    4. close the opened workbook.

    What should it do?
    I want that the macro stops if the file with the selected name does not exist - so if i write in B3 February (example) and file with these name does not exist in folder it displays msg box - file with these name doesn't exist and stop the macro.
    To sum values in the column E of the opened workbook and displays the result in a msg box or in a cell (B4) of origin workbook.


    I really don't know hot to set up the code that it will work like I want.

    Your help will be appreciated,
    forfiett
    Last edited by JBeaucaire; 02-17-2013 at 03:51 AM. Reason: Use CODE tags, not QUOTE tags.

Thread Information

Users Browsing this Thread

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

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