PDA

View Full Version : how to add columns from other excel files



jumbel
08-26-2008, 05:34 AM
Hi,

I am having a macro which gets the data from several excel files and displays in one worksheet.
Now, I want to add few columns from other excel files in the resulting sheet without disturbing the order of the rows or columns. I am unable to add the data from other excel files.

Say I have two excel workbooks A and B with two worksheets 1 and 2. When I run the macro, a new sheet has to be displayed in the WorkBook A. I would like to display a new column in the resulting worksheet. The column should be added at a specified area not at the beginning ot the ending.

mdmackillop
08-26-2008, 04:02 PM
Hi Jumbel
Welcome to VBAX
A new sheet added will be blank unless it is a copy of an existing sheet, so adding a column has no meaning. Can you clarify further?
Regards
MD

jumbel
08-28-2008, 05:28 AM
I need to display a lot of rows and columns from other workbooks in the new disply page. However, I need to add a empty column somewhere in the middle.

According to my example, A and B are workbooks
and each work book contains 2 sheets, sheet1 and sheet2.Now, when I run the macro, a new sheet Sheet 3 has to be displyed in workbookA with the data from sheet2 of workbook B. I also need to add a empty column wherever needed in between the existing data on the new sheet. It should be dynamic so that I can add that column wherever I want to.

mdmackillop
08-28-2008, 05:41 AM
Try recording a macro carrying out the necessary actions. If you then need help refining it, let us know.