Excel Macro issue - How to copy and paste select rows from one sheet to another

J

jlsnsw

Hello everyone.
I am a newbie here and new to creating and modifying macros.

Question: I have a workbook that contains roughly 3500 records an
want to create a macro that copies certain rows and pastes them t
specific sheets in the book based on one criteria, the text in th
cell.
I recorded a macro and it will work for the selected book, but I hav
to do this weekly and the number of rows change from week to week.

Here is the recorded macro:

Selection.AutoFilter Field:=2, Criteria1:="PHC-ACADMIN"
ActiveCell.Rows("1:90").EntireRow.Select
Selection.Copy
Sheets("ACADMIN").Select
Sheets("ACADMIN").Name = "ACADMIN"
ActiveCell.Select
ActiveSheet.Paste

The problem I have, is that the range in ActiveCell.Rows("1:90) change
and pulls data that I do not want in the sheet where is pastes.

Can someone help me.
Thank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top