LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Dynamically locating value; selecting that row and everything above (or below) and deleting/copying

I can read the mind of a fellow Rosenberg better than any of you...

I have no idea. <bg
--
__________________
Robert Rosenberg
R-COR Consulting Services
Microsoft MVP - Excel


"Ken Wright" wrote in message
...
LOL - Guess it's open to interpretation, but I was assuming that he is

looking
for a specific record and that's all he wants to keep. Over to the OP for
clarification I guess, coz I'm curious now :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

--------------------------------------------------------------------------

--
It's easier to beg forgiveness than ask permission :-)
--------------------------------------------------------------------------

--



"Robert Rosenberg" wrote in message
...
Ken,

I think you may have missed the caveat re 'OR below' <g

I'm unsure whether the poster wants to have the choice of above OR below

but
it didn't sound like both.

--
__________________
Robert Rosenberg
R-COR Consulting Services
Microsoft MVP - Excel


"Ken Wright" wrote in message
...
One way:-

Sub DelRows()

ans = InputBox("What string do you want to find and then delete all

other
rows?")
Application.ScreenUpdating = False

LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count

Set Rng = Range(Cells(1, "A"), Cells(LastRow, "A"))

With Rng
.AutoFilter
.AutoFilter Field:=1, Criteria1:="<" & ans
.SpecialCells(xlCellTypeVisible).EntireRow.Delete
End With
Application.ScreenUpdating = True

End Sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03


--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission :-)


--------------------------------------------------------------------------
--



"Steven Rosenberg" wrote in message
...
How can I write a VBA macro which:

--will locate a specific value (a word) in column A of a
multi column worksheet; then

--select that cell's entire row, and all rows above (or
below) it; then

--delete the selected rows?

This non-programmer would appreciate any and all
help.

Steven

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.600 / Virus Database: 381 - Release Date: 28/02/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.600 / Virus Database: 381 - Release Date: 28/02/2004




 
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
locating and deleting duplicate cell entries John Excel Discussion (Misc queries) 2 December 8th 09 06:43 PM
Locating and selecting Data from Worksheet Jason K[_2_] Excel Discussion (Misc queries) 2 May 29th 09 04:21 PM
Dynamically Copying Changing Conditional Formatting sdm New Users to Excel 0 September 5th 08 05:42 PM
Selecting AND Deleting bodhisatvaofboogie Excel Discussion (Misc queries) 11 May 24th 06 01:18 PM
Copying font and pattern dynamically RTP Excel Discussion (Misc queries) 1 June 23rd 05 11:55 PM


All times are GMT +1. The time now is 08:24 AM.

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"