Macro Help
Range(Range("A2"), Range("A2").SpecialCells(xlLastCell)).Select is coming up
highlighted as an error in the debugger, any clues?
"Luke M" wrote:
Assuming a header row in row 1, you can use these two lines of code to select
only visible data starting in row 2:
Range(Range("A2"), Range("A2").SpecialCells(xlLastCell)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"Jason G" wrote:
I'm recording a macro in excel, in short i have a s/sheet template with 5
worksheets in it and i want to record a macro to run the following;
I paste a dataset into worksheet A
i autofilter it and cut out chunks of data based on the autofilter
selections and paste it into the other sheets based on several different
filter selections on a couple of different columns, leaving me with a
percentage of the original dataset in worksheet A and chunks of it in
worksheets B-D
now when i autofilter i select all rows under this filter to cut and paste
into one of the other worksheets
in my macro this reads as a long list of the row numbers of the rows in
question from the instance in which i record the macro, but next time i want
to run this macro i want it to just take the rows displayed under the
autofilter selections, not the row numbers that were relevant first time
round.....
how do i get it to pick up on the fact that i'm cutting out the results (all
rows) of a specified autofilter criteria rather than specific rows?
|