LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JH JH is offline
external usenet poster
 
Posts: 64
Default copy last row without header

Hello again

I'm using folowing statements in my macro
the first one copy last row of filtred data and copy it to other sheet
criteria1 are changed in loop

With Sheets(wrkjm & "-9")
Set r = .Range(.Range("B1"), .Range("B" & Rows.Count).End(xlUp))
r.AutoFilter field:=2, Criteria1:=vyr
r.AutoFilter field:=4, Criteria1:=zav
Set r = r.SpecialCells(xlCellTypeLastCell).EntireRow
End With
r.Copy Sheets(wrkjm).Range("A" & radek2)

and the second one
copy filtred range without sheet's header to the other sheet
Set rng = ActiveSheet.AutoFilter.Range
If rng.Columns(1).SpecialCells(xlVisible).Count 1 Then
rng.Offset(1, 0).Resize(rng.Rows.Count - 1).Copy _
Destination:=Worksheets(wrkjm).Range("A" & lastrow + 1)

I got both on this forum from Tom Ogilvy and work separately well

But I need to "join" them in order to achieve following:
copy last row from the filtred list without copying header to other sheet

Thanks
JH

 
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
Header copy across workbooks BruceD Excel Discussion (Misc queries) 2 July 20th 07 05:26 PM
Match Header...Copy Column mjack003 Excel Discussion (Misc queries) 6 September 23rd 05 01:33 PM
Want to reuse a logo in a header but can't seem to copy it deerjc Excel Discussion (Misc queries) 3 August 30th 05 12:49 AM
Need Help - Copy/Paste & Header Row Donnie Stone Excel Programming 3 October 18th 03 01:03 AM
How to copy header/footer info? Capt'n Roy Excel Programming 2 October 14th 03 02:37 PM


All times are GMT +1. The time now is 02:50 PM.

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

About Us

"It's about Microsoft Excel"