Copying data from different sheets to one mastersheet

  • Thread starter Thread starter CompletelyClueless
  • Start date Start date
C

CompletelyClueless

Hi!

I'm quite noob when it comes to making VBA formulas in excel :/ so i wonder
if anyone here could help me out with this one.


I have four sheets: one master sheet "Katselu", that should collect all the
data written to other sheets. Other sheets are"Urakka","Ylityo" and
"Tuntityo".

New data is written to these different "slave" sheets row by row..and these
rows should update to the Master Sheet (eachto a new row)..perhaps when
clicking a Command button "Update" or so.....

There. I hope someone understands what i'm trying to ask/get advice here :)
I need all the help i can get :)
 
Hi Shasur!

Many thanks for the tip! :)

But I would instead a QueryTable prefer to use some kind of a code that
would just copy the new inserted data rows from the slave sheets and then
paste the copied rows in to the Master Sheet(in new available rows)...It
should be as easy/simple as possible.
 
Hi

Here is a hint

Sub Copy2Master()

Dim oSht_Katselu As Worksheet
Dim oSht_Urakka As Worksheet
Dim lMax_Katselu As Long

Set oSht_Urakka = Worksheets("Urakka")
Set oSht_Katselu = Worksheets("Katselu")

' Last Row of the Master Sheet
lMax_Katselu = oSht_Katselu.Cells.SpecialCells(xlCellTypeLastCell).Row

' Here I am assuming to copy the second row of urakka after the last row of
master sheet
oSht_Urakka.Rows(2).EntireRow.Copy
Destination:=oSht_Katselu.Rows(lMax_Katselu + 1)

End Sub

I am trying to copy from one sheet to the master. You can make it for three
sheets. The challenge here for you to identify the changes that are made in
the slave sheets.
 
Back
Top