Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Delete Rows above a certain point

Julie,

This worked in Excel97

Dim rng As Range
Set rng = Columns(1).Find("Report")
If Not rng Is Nothing Then
Range(Rows(1), Rows(rng.Row - 1)).Delete
Else
MsgBox "Not found"
End If


--
sb
"Julie" wrote in message
...
Is there anyway to delete rows above a certain point?

I have a document that I import and my data varies each
time. I want to create a macro to find a certain word in
my report and then delete all the rows above that row.

Ex: If I have a row in my report (in column A)
called "Report Analysis", I want all of the rows above
that word to be deleted.

Note: The word is never in the same row number.
Sometimes it is Column A, Row 20 and sometimes it is
Column A, Row 30.

Thanks in advance for any help!
Julie



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
delete bad data point in excel 2007 Abu M.P. Hussain New Users to Excel 1 June 23rd 08 03:26 PM
How to add rows, to point to new row nastech Excel Discussion (Misc queries) 5 June 13th 06 09:18 AM
In excel, how can i delete 1 digit and the decimal point? rjtees Excel Worksheet Functions 1 November 17th 05 09:43 PM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM
How do I delete data in a column from a certain point on? carolineeg Excel Worksheet Functions 0 May 19th 05 03:20 PM


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