Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Yuvraj Excel Discussion (Misc queries) 0 June 26th 09 06:01 PM
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 [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? Steven Rosenberg Excel Programming 0 August 5th 03 06:10 AM


All times are GMT +1. The time now is 01:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"