Copy rows based on a condition
Solved/Closed
Blossom83
-
Oct 14, 2008 at 12:53 PM
ravichennai86 Posts 1 Registration date Wednesday December 12, 2018 Status Member Last seen December 12, 2018 - Dec 12, 2018 at 08:00 AM
ravichennai86 Posts 1 Registration date Wednesday December 12, 2018 Status Member Last seen December 12, 2018 - Dec 12, 2018 at 08:00 AM
Related:
- If cell contains text then copy to another sheet
- Excel vba copy rows to another worksheet based on criteria - Best answers
- Excel if cell contains text then copy row to another sheet - Best answers
- How to change account based in instagram - Instagram Forum
- Based on the values in cells b77 b81 ✓ - Excel Forum
- Excel duplicate rows based on cell value ✓ - Excel Forum
- How to disable a cell in excel based on condition vba ✓ - Excel Forum
- Excel vba copy rows to another worksheet based on criteria ✓ - Excel Forum
8 replies
Assumptions for this code:
1. Employee Inventory sheet has heading in row one so it will start checking the data in row 2.
2. Column Q does not have any empty cells.
3. EEs sheet will have headings in row one so the data will start copying in row 2.
1. Employee Inventory sheet has heading in row one so it will start checking the data in row 2.
2. Column Q does not have any empty cells.
3. EEs sheet will have headings in row one so the data will start copying in row 2.
Set I = Sheets("Employee Inventory") Set e = Sheets("EEs") Dim d Dim j d = 1 j = 2 Do Until IsEmpty(i.Range("Q" & j)) If i.Range("Q" & j) = "TERM" Then d = d + 1 e.Rows(d).Value = i.Rows(j).Value End If j = j + 1 Loop
Sep 10, 2009 at 02:01 PM
Just one more thing: How is it possible to copy data always on the fist empty row on the correspondant sheet (here EES sheet), if this sheet can contain altering number of rows time by time.
Thanks,
Anne
Jan 31, 2010 at 03:08 PM
I am trying to use this code but its giving me error as Object defined error at do loop.
Can you please help me out