PDA

View Full Version : Copy data from Multiple to SINGLE worksheet.



zebradoby
06-12-2008, 12:51 PM
I want to copy data from multiple worksheets into MASTER worksheets. Can anyone help please?
User clicks a button and it copies data into MASTER from all worksheets. I have attached the test template.
Thanks

zebradoby
06-12-2008, 01:51 PM
File attached.

lucas
06-12-2008, 01:55 PM
Try this Tex. You have to delete the master sheet because it is created by the script.

I deleted your Master but it looked like it had some code where you were trying to get this to work........let me know how close we are....

david000
06-12-2008, 02:32 PM
let me know how close we are....
:clap:

I would delete all but rows 1:2 above the try me button first. i.e get rid of the extra headers.

zebradoby
06-12-2008, 10:33 PM
i want to give a button on master worksheet on right hand side. the data will flow to master worksheet and pull corresponding data from all worksheets on clicking this button. how do i do that? I am confused. and i am new to vba.

lucas
06-13-2008, 05:50 AM
Maybe like this......?

zebradoby
06-16-2008, 07:30 AM
Hi Lucas

I get an error message. See the attached file. Its on

CommandBars("My Toolbar").Delete

This code of line.

Also, how do I populate the date and time on the last column in Master worksheet. That will be the date and time when the macro is run each time.

Can you please help!

zebradoby
06-16-2008, 08:29 AM
Hi

i have attached the file. and the button on MAIN Worksheet.

thanks

zebradoby
06-16-2008, 09:21 AM
I fixed the error. Thats all i need for now:

How do I populate the date and time on the last column in Master worksheet. That will be the date and time when the macro is run each time.

To Run: Click button MAIN Worksheet.


Can you please help! Latest File is attached.

zebradoby
06-16-2008, 09:22 AM
Latest file is attached.


How do I populate the date and time on the last column in Master worksheet. That will be the date and time when the macro is run each time.

To Run: Click button on MAIN Worksheet.


Can you please help! Latest File is attached

lucas
06-16-2008, 11:14 AM
You keep asking for the last column for the date but I believe you mean the last row......see attached.

zebradoby
06-16-2008, 11:38 AM
Can we display the date and time below the button on Main worksheet used to run the macro?

lucas
06-16-2008, 12:39 PM
yes, you just reference the sheet main and the cell that you want to put the date in and make it's value = to Now

Sheets("Main").Range("C6").Value = Now

zebradoby
06-16-2008, 12:47 PM
i did this..it RESOLVED it.

Sheets("Main").Select
ActiveCell.FormulaR1C1 = ""
ActiveCell.FormulaR1C1 = "=NOW()"
Range("C10").Select

lucas
06-16-2008, 12:52 PM
Looks like you found your macro recorder......good. You should take a look at the code I posted as all of the extra selects are unnecessary. Another thing in your code when you select the sheet.....which cell is selected? If if is not the one you want the date in then the wrong cell will get the date.....

compare my code to yours and see if you can understand what is going on. Good to see you are learning something from the exercise.

zebradoby
06-16-2008, 01:09 PM
it updates date into where the cursor was last along with c10. how do i get it ONLY on c10 on main worksheet.

zebradoby
06-16-2008, 01:11 PM
i am good disregard my last posting.

zebradoby
06-16-2008, 02:05 PM
Hi LUCAS

The last row saved on running the macro is same as HEADER row in MASTER. Can we fix that? See attached file. We do not want to repeat the HEADER row at the bottom again.


THANKS

david000
06-16-2008, 06:29 PM
The last row saved on running the macro is same as HEADER row in MASTER. Can we fix that? See attached file. We do not want to repeat the HEADER row at the bottom again.
You have a sheet named "Unknown" on that sheet you have no data in column "A" - as a result, it's causing the first row to be copied over do to the nature of the code. Put some data in that column and it will work.

In your situation column A is mandatory!

lucas
06-17-2008, 07:28 AM
Yep, sheet unknown is the culprit. Delete it and run the code to see what David is talking about.

lucas
06-17-2008, 07:35 AM
By the way, this kind of request is most annoying.


DEFECT-NEED HELP!!!!

You are really lucky to get people to help you with this as you seem not to be the least bit interested in learning.......you just want a working solution.

We have places here where you can pay for complete solutions. In the future you should be trying to get some of the code working for yourself and ask specific questions. I will not be inclined to help you further until you start trying to learn. As I said, complete solutions are available for pay.......

If you had been trying to learn or where even paying any attention then you would not have been in a panic over the last problem.....you should have had some idea how the code works by now......

On top of that you seem to feel free to be demanding of our time and knowledge......please be courteous and respectful.