Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to copy and paste visible cells only?
Thanks Selection.Copy 'Add a new workbook and copy selected range Workbooks.Add Range("a1").Select Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2000, I use only
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=_ False, Transpose:=False and it works fine for me. Yes, you'd have to add the Paste Formats to get that; I didn't bother. But it did paste only the cells visible after AutoFilter and hiding. HTH Ed "Scott" wrote in message ... Is it possible to copy and paste visible cells only? Thanks Selection.Copy 'Add a new workbook and copy selected range Workbooks.Add Range("a1").Select Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Unless you data is from a filtered range, you would have to copy only the
visible cells Edit=Goto =Special, select Visible. Then do your copy --- Regards, Tom Ogilvy "Scott" wrote in message ... Is it possible to copy and paste visible cells only? Thanks Selection.Copy 'Add a new workbook and copy selected range Workbooks.Add Range("a1").Select Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Dim rCopy As Range On Error Resume Next 'in case no visible cells selected Set rCopy = Selection.SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not rCopy Is Nothing Then _ rCopy.Copy Destination:=Workbooks.Add.Sheets(1).Range("A1") In article , Scott wrote: Is it possible to copy and paste visible cells only? Thanks Selection.Copy 'Add a new workbook and copy selected range Workbooks.Add Range("a1").Select Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you! That worked great.
JE McGimpsey wrote: One way: Dim rCopy As Range On Error Resume Next 'in case no visible cells selected Set rCopy = Selection.SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not rCopy Is Nothing Then _ rCopy.Copy Destination:=Workbooks.Add.Sheets(1).Range("A1") In article , Scott wrote: Is it possible to copy and paste visible cells only? Thanks Selection.Copy 'Add a new workbook and copy selected range Workbooks.Add Range("a1").Select Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
COPY PASTE VALUES ONLY FROM/ON VISIBLE CELLS | Excel Discussion (Misc queries) | |||
Copy and paste visible cells to outlook | Excel Discussion (Misc queries) | |||
Copy/Paste Visible cells only | Excel Discussion (Misc queries) | |||
Copy & Paste Visible Cells with Formulas | Excel Worksheet Functions | |||
Select Visible Cells only copy & Paste | Excel Programming |