+ Reply to Thread
Results 1 to 1 of 1

Add Columns to Output File (if new columns are found in source books)

  1. #1
    Forum Contributor
    Join Date
    02-04-2015
    Location
    India
    MS-Off Ver
    365 (2202)
    Posts
    226

    Add Columns to Output File (if new columns are found in source books)

    Hello,

    Current Scenario :
    I have a Macro File which goes to a defined folder. Into that folder there are multiple excel workbooks
    Into Macro file, I've manually added some of the columns which are almost common in every workbooks
    This Macro goes to each workbook, copies the data to my Master file in transpose format (see attached output file)
    Into this Macro file, there is a Hidden sheet, into which I've added the column names and their content (see below e.g.)

    Vegetable white gourd
    Vegetable Ribbed gourd
    Vegetable Snake beans
    Vegetable Curry leaves
    Vegetable Bitter melon
    Vegetable Okra
    Country United States
    Country United Kingdom
    Country India
    Country Mexico
    Country Canada

    As in this example, we see there are Fruits, Vegetable and Country name
    Into Output file, data for the above column content has got updated after running the Macro
    But, in one of the Workbook, there is also an additional column content named as "City"
    As we have not updated this column content to the Master File manually, so I want the macro to automatically detect the column which is not in the master file and automatically update the same at the end i.e. Q1 (see Output File)
    Apart from Fruits, Vegetable and Country, if there are any new columns found into the source file, that should get added to the Macro file, as per standard in Output file

    The 1st source file was containing only Fruits, Vegetable and Country column, so the data has got updated in Row 3.

    In 2nd source file, there are also the above same column content, but there is additional one more column content i.e. "City".

    So the Macro should updated the data as per data shown in Row4 (Output file)

    Thanks,
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy across 9 columns of source data into 9 columns of an output table
    By nunez100 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-29-2019, 10:19 AM
  2. [SOLVED] Macro to Match Criteria in Columns and Output to New Columns
    By technik in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-08-2018, 08:07 AM
  3. i need to sort three columns of data so the numbers match all columns where found
    By lisagonzalez in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-24-2015, 03:10 PM
  4. Macro for companring 2 or 3 columns and generate Output file
    By nethravathik in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2013, 09:05 AM
  5. Compare 2 / 3 Columns to get an consolidated output file
    By nethravathik in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-18-2013, 08:46 AM
  6. Replies: 1
    Last Post: 01-13-2010, 08:09 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