Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Get rid of empty rows

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: 1
Default Get rid of empty rows

Hi Mike,

Try like this! ;)


Code:
--------------------

With ActiveCell
Range(.Item(1), .Parent.Cells.Find("*", , , , 1, 2)).Select
End With

--------------------



---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Get rid of empty rows

Thanks! It works great.

Mike.
-----Original Message-----
Hi Mike,

Try like this! ;)


Code:
--------------------

With ActiveCell
Range(.Item(1), .Parent.Cells.Find("*", , , , 1,

2)).Select
End With

--------------------



---
Message posted from http://www.ExcelForum.com/

.

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
Hpw do I delete multiple empty rows found between filled rows? Bill Excel Worksheet Functions 2 November 15th 09 07:12 PM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
How do I sort with empty rows between none empty rows? Excel Challenged Excel Worksheet Functions 1 August 17th 06 03:59 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM
Can Excel "slide up" rows with content thru empty rows to condense portly44 Excel Worksheet Functions 2 April 1st 05 12:47 AM


All times are GMT +1. The time now is 04:33 PM.

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"