Copy a row from one worksheet to another, based on criteria
Solved/Closed
wy
-
Oct 27, 2015 at 07:00 PM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Feb 20, 2017 at 09:19 PM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Feb 20, 2017 at 09:19 PM
Related:
- Vba code to copy data from one sheet to another based on criteria
- Macro to copy data from one workbook to another based on criteria - Best answers
- Transfer data from one excel worksheet to another automatically based on criteria - Best answers
- Transfer data from one excel worksheet to another automatically - Guide
- How to get whatsapp verification code online - Guide
- Battery reset code - Guide
- Www.gameloft.com unlock code ✓ - Phones, PDA & GPS Forum
- Samsung volume increase code - Guide
12 responses
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Oct 28, 2015 at 02:09 AM
Oct 28, 2015 at 02:09 AM
Hello Wy,
A code like the following may do the task for you:-
As I don't know what your criteria is, I've just used the letter "C" for now in the code. Change it to suit yourself.
Following is a link to a test work book I did for another Poster some time ago. I believe it is similar to your situation:-
https://www.dropbox.com/s/b7xmw9eva4ndrpv/Ed.xlsm?dl=0
In the test work book, only those rows with the letter "C" in Column A are transferred to sheet 2. Click on the Copy Data button to see it work.
I hope that this helps.
Cheerio,
vcoolio.
A code like the following may do the task for you:-
Sub CopyStuff() Application.ScreenUpdating = False With ActiveSheet .AutoFilterMode = False With Range("A1", Range("A" & Rows.Count).End(xlUp)) .AutoFilter 1, "C" On Error Resume Next .Offset(1).EntireRow.Copy Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1) End With .AutoFilterMode = False End With Application.ScreenUpdating = True Sheet2.Select End Sub
As I don't know what your criteria is, I've just used the letter "C" for now in the code. Change it to suit yourself.
Following is a link to a test work book I did for another Poster some time ago. I believe it is similar to your situation:-
https://www.dropbox.com/s/b7xmw9eva4ndrpv/Ed.xlsm?dl=0
In the test work book, only those rows with the letter "C" in Column A are transferred to sheet 2. Click on the Copy Data button to see it work.
I hope that this helps.
Cheerio,
vcoolio.