Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy cell row
How can I modify this so that it check for all the rows that have a 40 in the last cell and will copy all the rows that have 40 in the last cell to a new work sheet and also delete the rows after it copies them ( delete just the ones that have 40 in the last cell that it copied) Sub CopyLastRow() Dim LastRow As Object Set LastRow = Sheets("Sheet2").Range("A65536").End(xlUp) If Sheet1.Cells.SpecialCells(xlCellTypeLastCell) = 40 Then Sheet1.Cells.SpecialCells(xlCellTypeLastCell).Enti reRow.Copy LastRow.Offset(1, 0) Sheet2.Cells.SpecialCells(xlCellTypeLastCell).Enti reRow.Paste End If End Sub -- Philmer ------------------------------------------------------------------------ Philmer's Profile: http://www.excelforum.com/member.php...o&userid=16577 View this thread: http://www.excelforum.com/showthread...hreadid=314445 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell | Excel Worksheet Functions | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? | Excel Programming |