Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to copy and paste filtered data on Wksht A into a report on Wksht B. The number of lines in the filtered range on Wksht A will vary for each report. The upper left paste location on Wkst B is a cell named SpecDate. I want to insert extra complete rows if the filtered data is greater than 1 row. This is because I have other report sections below the destination that I wish to push down. I've tried a few ways, but to no avail. This is my latest attempt - I don't get errors but nothing pastes. I'm *not* great in VBA, as you can see. Thanks! Dim rng As Range, i As Long Set rng = ActiveCell.CurrentRegion rng.Select i = rng.Rows.Count rng.Copy Application.Goto Reference:="SpecDate" If i = 1 Then rng.PasteSpecial Paste:=xlPasteAll Else ActiveCell.EntireRow.Resize(rowsize:=i - 1).Insert Shift:=xlDown rng.PasteSpecial Paste:=xlPasteAll End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows | Excel Programming | |||
Pasting rows below the last row with data? | Excel Programming | |||
how do I insert a blank row when pasting? | Excel Discussion (Misc queries) | |||
Pasting in Rows? | Excel Discussion (Misc queries) | |||
Pasting formulas to different rows | Excel Worksheet Functions |