Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default A popup to filter out what you don't need.

Is there a macro I can use to remove data across the entire row depending
what has been typed in a popup msg box to ask "What would you like to keep?".
Have it
look at a column with such fields to filter.

Here I would want to only keep "color" and the remainder rows get deleted.

A B
black color
red color
blue color
yellow color
bat object
coat object
box object

Thanks in advance,

SimplyM

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default A popup to filter out what you don't need.

DataFilterAutofilterCustom on column B

"does not equal" or "does not contain" color

With those "color" rows filtered out, select the visible remaining and
EditDelete Row

If you want a macro, record whilst doing the above.


Gord Dibben MS Excel MVP

On Thu, 26 Jul 2007 18:12:02 -0700, simplymidori
wrote:

Is there a macro I can use to remove data across the entire row depending
what has been typed in a popup msg box to ask "What would you like to keep?".
Have it
look at a column with such fields to filter.

Here I would want to only keep "color" and the remainder rows get deleted.

A B
black color
red color
blue color
yellow color
bat object
coat object
box object

Thanks in advance,

SimplyM


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default A popup to filter out what you don't need.

Thanks Gord - I was actually specifically looking for a popup to do this
function. I have a sheet that I need to create new tabs from each new
change in column B. It seems like the filter process takes too much time for
me. I would rather type what I want to keep and delete the rest.



"Gord Dibben" wrote:

DataFilterAutofilterCustom on column B

"does not equal" or "does not contain" color

With those "color" rows filtered out, select the visible remaining and
EditDelete Row

If you want a macro, record whilst doing the above.


Gord Dibben MS Excel MVP

On Thu, 26 Jul 2007 18:12:02 -0700, simplymidori
wrote:

Is there a macro I can use to remove data across the entire row depending
what has been typed in a popup msg box to ask "What would you like to keep?".
Have it
look at a column with such fields to filter.

Here I would want to only keep "color" and the remainder rows get deleted.

A B
black color
red color
blue color
yellow color
bat object
coat object
box object

Thanks in advance,

SimplyM



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default A popup to filter out what you don't need.

Try this macro.

Option Compare Text
Sub Delete_By_Criteria()
Dim i As Integer
Dim iLastRow As Integer

Set wks = ActiveSheet
Application.ScreenUpdating = False
ActiveSheet.Range("B:B").Select

whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *co* can be used")

iLastRow = wks.Cells(Rows.Count, 2).End(xlUp).Row
For i = iLastRow To 1 Step -1
If Not wks.Cells(i, 2).Value Like whatwant Then
wks.Rows(i).Delete
End If
Next i
Application.ScreenUpdating = True
Exit Sub

End Sub


Gord

On Thu, 26 Jul 2007 18:46:00 -0700, simplymidori
wrote:

Thanks Gord - I was actually specifically looking for a popup to do this
function. I have a sheet that I need to create new tabs from each new
change in column B. It seems like the filter process takes too much time for
me. I would rather type what I want to keep and delete the rest.



"Gord Dibben" wrote:

DataFilterAutofilterCustom on column B

"does not equal" or "does not contain" color

With those "color" rows filtered out, select the visible remaining and
EditDelete Row

If you want a macro, record whilst doing the above.


Gord Dibben MS Excel MVP

On Thu, 26 Jul 2007 18:12:02 -0700, simplymidori
wrote:

Is there a macro I can use to remove data across the entire row depending
what has been typed in a popup msg box to ask "What would you like to keep?".
Have it
look at a column with such fields to filter.

Here I would want to only keep "color" and the remainder rows get deleted.

A B
black color
red color
blue color
yellow color
bat object
coat object
box object

Thanks in advance,

SimplyM




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
Popup calendar GerryK Excel Discussion (Misc queries) 1 April 4th 07 07:14 PM
Create a Popup box Darius Excel Discussion (Misc queries) 1 March 2nd 06 05:49 PM
Clipboard Popup Martin Excel Worksheet Functions 1 November 30th 05 06:51 PM
Message popup bbc1 Excel Discussion (Misc queries) 7 August 15th 05 03:29 PM
"Why did we get here????" popup jtwspoon Excel Discussion (Misc queries) 3 February 4th 05 04:57 AM


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