Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default control end in a macro

I am creating a macro that will filter all of the rows of data in sheet 2
that have an x in a column, copy them, and insert them at the bottom of the
data set in sheet 1 - basically the first available blank row.
My problem is that when recording the macro when i go to sheet 1 to paste i
am using the control end key to find the last record and it is bringing me to
row 65000 when i only have 5000 rows of actual data.
Is there another way besides control end to get to the bottom of the data?
thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default control end in a macro

Have you tried

Range("A" & UsedRange.Rows.Count).Offset(1,0)

Also it sounds like the "dirty area" of your worksheet is far beyond
the actual used range. You might want to fix that.

--JP

On May 28, 11:30*am, Belinda7237
wrote:
I am creating a macro that will filter all of the rows of data in sheet 2
that have an x in a column, copy them, and insert them at the bottom of the
data set in sheet 1 - basically the first available blank row.
My problem is that when recording the macro when i go to sheet 1 to paste i
am using the control end key to find the last record and it is bringing me to
row 65000 when i only have 5000 rows of actual data.
Is there another way besides control end to get to the bottom of the data?
thanks!


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
Using a macro to control the autofilter function APealin[_2_] Excel Worksheet Functions 2 March 26th 07 02:18 PM
Control button / macro Sarah Excel Discussion (Misc queries) 2 February 11th 07 04:45 AM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
assign a macro to a control button ewan72 Excel Discussion (Misc queries) 1 December 3rd 04 02:04 PM
How do I link a macro to an ActiveX control? New Users to Excel 0 November 27th 04 11:04 AM


All times are GMT +1. The time now is 10:57 PM.

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

About Us

"It's about Microsoft Excel"