Copying data from different sheets to one mastersheet

  • Thread starter CompletelyClueless
  • 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 :)
 
C

CompletelyClueless

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.
 
S

Shasur

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top