Macro to copy filtered data from one sheet to another.

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:46 PM GMT

Question

I have anfile which contains a "Base Data" sheet consisting of columns "A" to "BH" and a "Report" Sheet consisting columns from "A" to "AA". The "Report" sheet contains cell in which I need to key in an employee code.

I want to record a macro in this file in order to copy certain columns from "Baes Data" Sheet pertaining to the employee code mentioned in "Report" sheet and paste this data to the specified columns in "Report" Sheet.

I tried recording a macro in which I used a advanced filter to filter the data pertaining to a particular employee code mentioned in a "Report" sheet and tried copying the data to "Report" sheet. But when I ran that macro, the data is not geting copied properly..

Thanks in advance, Prashant..

Answer

Prashant, Only recording a macro will not always be enough. Some parameters will need not be modified in MACRO to generalize the macro to suite the requirements. This should be relatively easy task once the exact format of file / columns is known. Regards

Question

I have anfile which contains a base data sheet consisting of columns "A" to "BH" and a report sheet consisting of columns "A" to "AA". The report sheet contains cell in which I need to key in an employee code.

I want to record a macro in this file in order to copy certain columns from "Baes Data Sheet" pertaining to the employee code mentioned in "Report sheet" and paste this data to the specified columns in "Report Sheet".

Prashant..

Answer

Hello Prashant,

This type of macro cannot be "recorded", but must be "written" because the data to be copied depends on the employee code keyed in. I think the easiest way for me to help you with this would be for you to email me thefile, along with some instructions as to which data you want copied and where it should go, and I can add the macro and email it back to you. My email address is VBAexpert-AT-myway.com (replace -AT- with @).


Question

I have anfile which contains a base data sheet consisting of columns "A" to "BH" and a report sheet. The report sheet contains cell in which I need to key in an employee code.

I want to record a macro in this file in order to copy certain columns from "Baes Data Sheet" pertaining to the employee code mentioned in "Report sheet" and paste this data to the specified columns in "Report Sheet".

Answer

Advertisement

©2024 eLuminary LLC. All rights reserved.