ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   automatically copy selected data from one excel to other excel (https://www.excelbanter.com/excel-programming/339249-automatically-copy-selected-data-one-excel-other-excel.html)

Raja

automatically copy selected data from one excel to other excel
 
hi,

Greetings..

I have 3 Excel file with more than 700 rows and columns.I have to select
some data and want to make some calculations with that and display the
consolidated resultants in the new excel file.

I have no clear path..Kindly guide me...




Patrick Molloy[_2_]

automatically copy selected data from one excel to other excel
 
use th efollowing code to copy the selected data to a new workbook...

dim wb as workbook
dim ws as worksheet
dim source as range
set source = selection
set wb = workbooks.Add
set ws = wb.activesheet
with ws.Range("A1").resize(source.rows.count,source.col umns.count)
.Value = Source.Value
end with

since you have given no indication of what calculations are required, the
best method to begin learning for yourself would be to turn on the
macro-recorder, add whatever formula you need, stop the recorder and view the
code.
Code generated this way is not usually very flexible, but once you get the
idea, you can often easily adapt it.

"raja" wrote:

hi,

Greetings..

I have 3 Excel file with more than 700 rows and columns.I have to select
some data and want to make some calculations with that and display the
consolidated resultants in the new excel file.

I have no clear path..Kindly guide me...




Raja

automatically copy selected data from one excel to other exce
 
thank you for ur guidance..

it worked well...
but i couldnt understand the code.. what should i do if i understand the
code..(tips pls)if i want to make some calculations where should i do?


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com