Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello:
I was trying to find a way to paste into visible cells only. I found a macro on another site and have pared it down to the following: Sub VisbleCellsPasting() On Error Resume Next Dim aRng As Range Dim aRn As Range Dim bRng As Range Set aRng = ActiveSheet.Range("B234:B273") Range("F2").Select For Each aRn In aRng Set bRng = ActiveCell If bRng.EntireRow.Hidden = False Then bRng = aRn bRng.Offset(1).Select Else Do If ActiveCell.EntireRow.Hidden = True Then ActiveCell.Offset(1).Select End If Loop Until ActiveCell.EntireRow.Hidden = False ActiveCell = aRn ActiveCell.Offset(1).Select End If Next End Sub This code works fine, but I have some issues... The macro hard codes the selection that I need to paste and where I need to paste it. I would like to be able to use the normal Excel copy (Ctrl+C) on my data I need to paste (where ever it lives whether in a new workbook or not) and click the macro button and have it paste where I need it. Is this possible? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Paste visible cells? | Excel Worksheet Functions | |||
Is it possible paste to visible cells only? | Excel Discussion (Misc queries) | |||
Paste to Visible Cells only | Excel Discussion (Misc queries) | |||
Paste into visible cells | Excel Discussion (Misc queries) | |||
Paste into Visible Cells Only | Excel Discussion (Misc queries) |