Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Automatically Delete Text at the end of an imported report into Ex

I have a report that I import into Excel each day. At the bottom of the
report is text I want to delete before running a macro. The number of rows
in the report varies each day. I'd like to add code in my macro that
automatically deletes that specific text at the end of the report or deletes
the last 3 rows no matter how many rows are in the report. Can this be done
with VBA code? Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automatically Delete Text at the end of an imported report into Ex

Assume the text is in column A (adjust to the actual situation)

Dim rng as Range
set rng = Cells(rows.count,"A").End(xlup).Offset(-2,0).Resize(3)
rng.entireRow.Delete

--
Regards,
Tom Ogilvy

"SITCFanTN" wrote in message
...
I have a report that I import into Excel each day. At the bottom of the
report is text I want to delete before running a macro. The number of

rows
in the report varies each day. I'd like to add code in my macro that
automatically deletes that specific text at the end of the report or

deletes
the last 3 rows no matter how many rows are in the report. Can this be

done
with VBA code? Thank you



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
automatically updating imported statistics Walter New Users to Excel 1 February 24th 08 03:16 PM
Automatically modifying imported reports waterskyle Excel Discussion (Misc queries) 1 December 7th 05 11:37 AM
imported impromtu report date issue - fix by format or formula Todd F. Excel Discussion (Misc queries) 3 July 7th 05 09:57 PM
how do you generate a report every 5 mins automatically and delete SwitchBrain Excel Programming 1 March 23rd 05 03:45 AM
Data analysis of imported Report Mike Fogleman Excel Programming 3 September 23rd 03 11:58 PM


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