Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
locating and deleting duplicate cell entries | Excel Discussion (Misc queries) | |||
Locating and selecting Data from Worksheet | Excel Discussion (Misc queries) | |||
Dynamically Copying Changing Conditional Formatting | New Users to Excel | |||
Selecting AND Deleting | Excel Discussion (Misc queries) | |||
Copying font and pattern dynamically | Excel Discussion (Misc queries) |