Hi everyone.
I faced with a problem. I need to make an auto moving cells.
If there is any information on sheet "1", it automatically appears on sheet "main"
Nothing complex at this moment, but I need the information to be copied from 3 different sheets to one "main" and to keep an cells in order.
I attached a file with
sheet "1", "2", "3" - from where the info is taken
Sheet "main" - where the info must appear
There some more explanations about it in the file.
I would be very grateful for your help.![]()
How will the code identify which words have come from sheet 1 or 2 or 3? There is no identifier in your Main sheet.
It have to look whether it is something in sheet 1 if it is, then add when nothing is left to add, it looks whether there is some thing to add from sheet 3, if not then add nothing, if there is some info, it adds this info and finally when finished with sheet 1 and 2 it goes to look whether sheet 3 has some information in particular cells and again if there is info it adds if no then nothing appears.
Is it possible?![]()
No, what i asked was - in the main sheet, how will the code identify where it has to insert the row? How will it know that it has to go to row 42 and copy the new entry below it for sheet 2? There is no column identifying that the row came from sheet 2.
It doesn't matter, no particular raw is needed, just copy everything from sheet1 2 and 3.
The information on sheet 1 2 and 3 will change from time to time and there are no limitations for main sheet. For example on sheet 1 it can be only 5 rows, but on sheet 2 - 67 rows and on 3rd one - 19 rows.
On the main sheet it will fill
5 rows from sheet1
67 rows from sheet 2
19 rows from sheet 3
without any blank cells, one after another.![]()
Any help would be appreciated![]()
Will a button on each sheet work which will copy the data over to the main sheet?
Sorry for the delay. Was out of station for a few days.
Try this code -
Sub update_main() For i = 1 To Worksheets.Count If Worksheets(i).Name <> "main" Then Worksheets(i).Range("C3:E" & Worksheets(i).Range("E" & Rows.Count).End(xlUp).Row).Copy _ Worksheets("Main").Range("C" & Rows.Count).End(xlUp).Offset(1, 0) End If Next i End Sub
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks