Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name of Selected Cell

Status
Not open for further replies.

Carrion

Technical User
Jul 26, 2002
27
US
I am using the Find command to locate the first date in 2004 in a list. Then I want to delete all rows above that. The problem is that I have no way of selecting all the rows above that without having the computer know what row I am currently in. Is there a way to have this value returned. thanks
 
Is this Excel?

The ActiveCell.Row property will give you the row that is currently selected.

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Hi,

The general approch to your problem would be along these lines...
Code:
...
set found = find([i]your find spec[/i])
if found is nothing then
  'nothing found process
...
else
  'found process -- delete rows above
  range(cells(1, 1), cells(found.row-1, 1)).entirerow.delete
end if
:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top