Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'ts ok now
I've already solved it JH "JH" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Header copy across workbooks | Excel Discussion (Misc queries) | |||
Match Header...Copy Column | Excel Discussion (Misc queries) | |||
Want to reuse a logo in a header but can't seem to copy it | Excel Discussion (Misc queries) | |||
Need Help - Copy/Paste & Header Row | Excel Programming | |||
How to copy header/footer info? | Excel Programming |