Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone help me with creating a macro that would look through rows of a
table (around 100) and if the value in a specific column (lets say G) was equal to "1", it would cut and paste those entire rows to the bottom of the sheet? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dominique
This macro will do what you want. This macro assumes that your last row of data is the same as the last entry in Column A, and the last column of data is the same as the last entry in row 1. Modify this as needed. Watch out for line wrap in this message. Expand this message to full screen to see the code properly. HTH Otto Sub CutNPaste() Dim ColARng As Range Set ColARng = Range("A1", Cells(Range("A" & Rows.Count).End(xlUp).Row, _ Range("IV1").End(xlToLeft).Column)) ColARng.AutoFilter Field:=7, Criteria1:="1" ColARng.SpecialCells(xlCellTypeVisible).Copy _ Range("A" & Rows.Count).End(xlUp)(2) ColARng.SpecialCells(xlCellTypeVisible).EntireRow. Delete Range("A1").Select End Sub "Dominique Feteau" wrote in message ... Can someone help me with creating a macro that would look through rows of a table (around 100) and if the value in a specific column (lets say G) was equal to "1", it would cut and paste those entire rows to the bottom of the sheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MACRO PASTE CELL to COLUMN, SKIP ROWS | Excel Discussion (Misc queries) | |||
A macro to copy & paste many rows (a range) to the next column .. | New Users to Excel | |||
Paste rows in macro | Setting up and Configuration of Excel | |||
Macro to find and paste rows | Excel Discussion (Misc queries) | |||
Macro to: Find a Reference, and then Paste into the 10 Rows Below | Excel Discussion (Misc queries) |