Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Delete Empty Rows @ End of Template

Excel 2000 ... I have a Template that consist of 15000
rows. The data I put in this template is always a random
number of rows, but always <15000 records.

I run a recorded Macro that formats the data ... However,
near the end of this recorded code I have VB code
(obtained from a much earlier post) which attempts to
delete all unused rows @ the bottom of the Template.

Issue is ... this last instruction appears to be deleting
all rows below 5319 which often cuts off my data.

Code written as follows:

cLastRow = Cells(Rows.Count, "B").End(xlUp).Row
Set myRng = Range("B" & cLastRow + 1 & ":B15000")
myRng.EntireRow.Delete

Above said ... I am looking for a VB Wizard of this board
to enlighten me on what I need to do or fix here ...
(note: Col B is my 1st Col of data & it includes data on
every row used.)

Thanks ... Kha
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
How to Delete empty rows in excel in b/w rows with values Dennis Excel Worksheet Functions 3 August 28th 07 04:15 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
Delete Empty Rows christian Excel Programming 4 September 20th 04 08:15 PM
Delete rows if they are empty chrismania[_7_] Excel Programming 4 October 27th 03 12:32 AM


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