Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Extra rows with no data

Hi. I am using the following line to select a range from
the active cell down to the last cell in the file. My
problem is that I want this to go to the last cell THAT
HAS DATA. There are several rows below this last cell
that are somehow recognized as being part of the range.
Is there either a way to delete the rows or to instruct
the macro to go to the last cell with data?

Range(Selection, ActiveCell.SpecialCells
(xlLastCell)).Select

Thanks,
Mike.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default Extra rows with no data

Mike wrote:
My
problem is that I want this to go to the last cell THAT
HAS DATA. There are several rows below this last cell
that are somehow recognized as being part of the range.
Is there either a way to delete the rows or to instruct
the macro to go to the last cell with data?

Range(Selection, ActiveCell.SpecialCells
(xlLastCell)).Select


Try:

Range(Selection, ActiveSheet.UsedRange.SpecialCells
(xlLastCell)).Select

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

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
How do I change my data or add extra rows in a Pivot Table for Ex. Kathryn Excel Discussion (Misc queries) 0 June 16th 08 01:22 AM
get rid of extra rows kendallzemp New Users to Excel 2 September 14th 07 05:55 AM
Macro/Formula to extra data from certain rows Scott Marcus Excel Discussion (Misc queries) 2 November 1st 06 05:23 PM
Why the extra rows?? Robert Brown Excel Discussion (Misc queries) 3 July 28th 06 03:13 PM
how do I get rid of extra rows sarahtar Excel Discussion (Misc queries) 1 November 13th 05 03:30 AM


All times are GMT +1. The time now is 03: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"