• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy data from one sheet to another using Macro.

Himanshu

New Member
Sheet 1 (RawData)

StoreName Amount Units Accountid Codes

Walmart $100 236 233445 095

Spartan $200 432 555444 065

Roundy $300 867 888777 066

Dazzel $400 548 565443 067

Brings $500 344 565443 513


Sheet 2 (DailyWork)

On this sheet Macro will paste only those rows of data(entire)which contain the following Codes (095,065,066,067,513) there can be other codes as well which i didn't mention in the above table. Sheet 1 (RawData) starts from cell "A7". Any help greatly appreciated.
 
Himanshu,


You can record a macro using Advance Filter.


You must set up a criteria range by setting up a list of the codes you want to include.


Then Filter In Place and then copy paste the results to the new sheet.


cheers


kanti
 
Hi Hui,


Yes, there are multiple lines with the same codes. For e.g 095 exists in 15 rows, 067 exists in 25 rows it's variable sometime less or more. One more thing there are other codes as well like 630,555,551 etc but i want the data only copied which contain the above mentioned codes.


Thanks
 
Himanshu

Have a go at the Advanced Filter as Kciba suggested


It will allow you to setup a repeatable and extendable structure to redo what you want regularly as the list of codes or data changes
 
Back
Top