Help the research with a Macro!

stonemeister

New Member
Joined
Dec 1, 2015
Messages
2
Hi Excellences!

I have here a quite complicated brain teaser.

I have created an .ods file (excel wasn't able to menage this amount of formulas, and I called this file "Dynamic") that allows me to make calculations of a huge amount of data, that I have collected in different sheets of different files.

Here's what I need to do for my research in the genetics field:

1) To copy all the values from A2 till V91, from the "DataSheet1", of the "DataFile1", into the "DynamicSheet" of "Dynamic" in position B4.

2) To copy the name of this "DataSheet1" into the cell AB17 of "Dynamic".

3) "Dynamic" will make calculus with this data and the results will appear in the sheet "summary" of the same file. I need to copy this results from the sheet "summary" cells C2:G23 and paste them in another file that i will call "MASTER".

4) I have to do this with all the sheets of all the files.

My english is not perfect and the work is complicated, i hope it's understendable and i really hope there is someone so good with VBA and so gentle to help a researcher doing his (without pay) job.

Thank you ahed of time!! i'm here for any clarification. Thaks again!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try this:
Code:
Sub test()

Dim wk1 As Workbook
Dim wk2 As Workbook
Dim wk3 As Workbook


Set wk1 = Workbooks.Open("d:\mypath1\Dynamic.ods")
Set wk2 = Workbooks.Open("d:\mypath2\DataFile1.xlsx")
Set wk3 = Workbooks.Open("d:\mypath3\MASTER.xlsx")


'To copy all the values from A2 till V91, from the "DataSheet1", of the "DataFile1", into the "DynamicSheet" of "Dynamic" in position B4


wk2.Sheets("DateSheet1").Range("A2:V91").Copy Destination:=wk1.Sheets("DynamicSheet").Range("B4")


'To copy the name of this "DataSheet1" into the cell AB17 of "Dynamic".


wk1.Sheets(1).Range("AB17").Value = wk2.Sheets("DataSheet1").Name


'I need to copy this results from the sheet "summary" cells C2:G23 and paste them in another file that i will call "MASTER".


wk1.Sheets("Summary").Range("C2:G23").Copy Destination:=wk3.Sheets(1).Range("A1")


End Sub
 
Upvote 0
Thank you for helping yky

Your code makes exactely what it has to do but i realized now that the code has to be in openoffice basic because once excel open the .odt file in which are all the formulas automatically starts giving error messages.

My problem is I know few about VBA and I know nothing about the openoffice version.

I'm new here, is this the right place where to talk about this kind of stuff? Thanx yky, thx everyone!
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top