Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Autofilter and Copy and Paste

I have a table of data in Sheet("Stepdown"). It has already been
autofiltered. I want to change all the autofiltered data in column T to "a".
Here is what I have (but it changes the filtered and autofiltered data to
"a").

Sheets("Stepdown").Range("T1").Select
Selection.End(xlDown).Select
ActiveCell.FormulaR1C1 = "a"
ActiveCell.Copy

Range(Selection, Selection.End(xlUp)).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

--
Thanks
Shawn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Autofilter and Copy and Paste

I think all you want to do is this:

Sub Better()
Range("T2", Range("T2").End(xlDown)) _
.SpecialCells(xlCellTypeVisible).Value = "a"
End Sub

No need to select, copy, paste, etc. This assumes thought that sheet
Stepdown is active. If it's not then:

Sub Better2()
With Worksheets("SetDown")
.Range("T2", .Range("T2").End(xlDown)) _
.SpecialCells(xlCellTypeVisible).Value = "a"
End With
End Sub

--
Jim Rech
Excel MVP
"Shawn" wrote in message
...
|I have a table of data in Sheet("Stepdown"). It has already been
| autofiltered. I want to change all the autofiltered data in column T to
"a".
| Here is what I have (but it changes the filtered and autofiltered data to
| "a").
|
| Sheets("Stepdown").Range("T1").Select
| Selection.End(xlDown).Select
| ActiveCell.FormulaR1C1 = "a"
| ActiveCell.Copy
|
| Range(Selection, Selection.End(xlUp)).Select
| Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
| False, Transpose:=False
|
| --
| Thanks
| Shawn


Reply
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
Autofilter - copy & paste Dorothy Excel Worksheet Functions 0 May 29th 06 10:56 PM
Copy/Paste in Autofilter honyacker Excel Discussion (Misc queries) 2 January 12th 06 02:38 PM
Sort, Copy, Paste..without Autofilter..Anyone??? jeffg Excel Worksheet Functions 1 October 19th 05 05:34 PM
How do you paste data when autofilter is on? Jac Excel Discussion (Misc queries) 2 December 3rd 04 10:44 PM
AUTOFILTER copy and paste RJ Kelly Excel Programming 1 June 8th 04 11:40 AM


All times are GMT +1. The time now is 01:18 AM.

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

About Us

"It's about Microsoft Excel"