Forum

Automate Copying Da...
 
Notifications
Clear all

Automate Copying Data From Sheet to Another Sheet

4 Posts
2 Users
0 Reactions
90 Views
(@bahramn983)
Posts: 2
New Member
Topic starter
 

hi guys 

I have a problem in excel , and i cant solve it myself, so can you give me hand ? i appreciate you ,
in the file that i attached to this mail i explain the thing that i want :
i have 2 worksheets . "bills" & "result".and every worksheets that i have infact have many tables and entries. i need a macro that search the first worksheet column "C" , and match it with the text that i write in the textbox. and copy and paste all entire rows data that matches , in a new worksheet like "result". if u can't undrestand me , sorry for my weak grammer. and you will find how that i want if you see the file .

in this case , i need to copy all of rows that the text in "name"'s column is "bahram", in "result" worksheet.

thanks , 

 
Posted : 04/03/2019 11:27 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Bahram

Give this a try. Please note that I am using Advanced Filter  with VBA.

You can refer here for more info on Advanced Filter https://www.myonlinetraininghub.com/excel-advanced-filters

I did notice your data is not in a tabular format and it may cause a problem when extracting data.

I suggest that you always have your data in a tabular format.

You can refer here for more info https://www.myonlinetraininghub.com/excel-tabular-data-format

Good luck.

Sunny

 
Posted : 04/03/2019 9:59 pm
(@bahramn983)
Posts: 2
New Member
Topic starter
 

Hi ,

Thank you very much ,

Very nice and this is exactly what i want. Great job

one more question , if i want to print the "result" worksheet , after i run this macro , what should i enter ?

thank u again 

 
Posted : 05/03/2019 8:48 am
(@sunnykow)
Posts: 1417
Noble Member
 

Just add this line before the End Sub

Sheets("Result").PrintOut

or if you want to preview then

Sheets("Result").PrintPreview

Just make sure that you have already done the page setup on the Result sheet.

Sunny

 
Posted : 05/03/2019 9:59 pm
Share: