View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Removing rows via macro/VBS script

Range("B85",Range("B85").End(xlUp)(2)).Entirerow.D elete

--
HTH,
Bernie
MS Excel MVP


"ssciarrino" wrote in message
...
I have created a worksheet that creates journal files for our financial
system for upload. Currently we have basic macros to do repetitive
operations such as unhide sheets and remove columns.

The worksheet has a default 85 rows and is populated to equal or less than
85 rows. I want to create a macro whereas when the first row reaches no more
input to truncate all rows below it.

For example, column B is the account field, if row 23 is the last line of
the journal load, I need row 24 to 85 to be deleted.

Not sure if a regular macro or visual basic can be used. If VB, can someone
give a sample script? Thanks