find and delete row

Hi

Can we have a macro which finds something and deletes that entire ro
and that too like 3 or more criterias:

like if it finds "------" and "manual"  and "blank" and so on

a macro with multiple criteria option, like all at one go

thank u so much frnd

--
Message posted from http://www.ExcelForum.com

0
5/19/2004 3:10:29 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
299 Views

Similar Articles

[PageSpeed] 34

Hi
try something like the following (looks in column A):
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
        with Cells(RowNdx, "A")
            if .value = "" or .value = "------" _
                or .value = "manual" then
                Rows(RowNdx).Delete
            End If
        end with
Next RowNdx
Application.ScreenUpdating = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany


> Hi
>
> Can we have a macro which finds something and deletes that entire row
> and that too like 3 or more criterias:
>
> like if it finds "------" and "manual"  and "blank" and so on
>
> a macro with multiple criteria option, like all at one go
>
> thank u so much frnds
>
>
> ---
> Message posted from http://www.ExcelForum.com/

0
frank.kabel (11126)
5/19/2004 3:21:44 PM
thanks a lot frank......appreciate ur hel

--
Message posted from http://www.ExcelForum.com

0
5/19/2004 3:37:14 PM
Reply:

Similar Artilces:

Find Discontinued Number
I have a spredsheet to a few columns and one of the field is check numbers. This column looks like this: Check # 101 102 103 106 107 109 110 .... 120 I want to find out which numbers are missing between 101 and 120. The result I want should be:104, 105,108... Could anybody help? Plumstone, There may be better ways of doing it but try: Sub tester() Dim x As Long Dim y As Long Dim n As Long Dim EndCell As Long Dim StartCell As Long Dim StartCol As Integer StartCell = 9 StartCol = 3 EndCell = Cells(Rows.Count, StartCol).End(xlUp).Row n = StartCell ...

Finding the currently selected cell in another worksheet
Hi, In Excel 2002 I want to display the current row of worksheet A in worksheet B (in another format). Does anyone know how to do this? Ideal would be if this updates automatically, but performance wise I guess a macro activated by a button in worksheet A would be the best solution. TBH, Jeroen Jeroen, I don't know of a way in a formula to determine the active cell of the worksheet. Worksheets other than the active one don't have an active cell. I think macros are the only way. Put this in a regular module: Public Roww As Long Put this in the sheet A module: Private Sub W...

delete command
In my subform, in the AfterUpdate of the field Quantity, i have the folowing code: If Me!size > 19 Then MsgBox " this is a drum. Please choose a drum" DoCmd.GoToControl "productid" DoCmd.Beep Exit Sub End If How can i delete any figures a i have entered in the field quantity? For example i have entered 2,i get the message that i am wrong, but before Exit i want to delete any figures,in my case 2, from the field Quantity ? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1 What could the code you've po...

Create Formula
I need to create a formula where I add a set number of Networkdays to a start date. Example: Start Date = 1/2/07 Number of Networkdays = 21 End Date = Is calculated If Start = 1/2/07 and 21 Networkdays are added, what is the retured end date???? I can only find example of Networkdays where I would be providing the Start and End Dates, and it will calculate the Networkdays. I can't find example where End Date is calculated based on the number of networkdays from start date. Can anyone help with a valid formula for this? Thanks!! ...

Showing Duplicate Rows
Hi All, I have seen the question with that same title however that is not exactly "showing" duplicates. It is more showing unique (not duplicate) I would like to truly show the duplicates. For instance there are several duplicate product numbers that are in my sheet and I want to display all the duplicates so that I can make corrections. IE: Item number 31323 31324 31325 31326 31326 31327 31328 31328 31329 31330 31331 How can I filter so that excel will only show those rows that have duplicate Item numbers? Thanks Eagle Use data>filter>autofilter>filter by column...

'07 Large Operation Error (Delete / Insert Rows and/or Columns)
Help! I was so excited to have '07 until... I have a very simple worksheet in a work book - This very simple worksheet takes up 78 rows and 16 columns. Minimals formats / formulas etc. I would like to insert additional rows but I get the error message which says "Large Operation. The operation you are about to perform affects a large # of cells and may take a significant amount of time to complete. Are you sure you want to continue? Note: This operation will be performed in 60 seconds if no response is received". I have tried to select "OK" as well a...

Subform..Deleting a Record by code
I have a Before Update event to Trap an Entry of "SN" (which is not acceptable) and results in a Msgbox and "Cancel = True". If the User backspaces the "SN" leaving a Null, and leaves the Record, how can I delete that record by code? TIA - Bob "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message news:46A5C7AA-F19F-477E-938A-D99EE9CBF4DC@microsoft.com... > I have a Before Update event to Trap an Entry of "SN" (which is not > acceptable) and results in a Msgbox and "Cancel = True". > > If the U...

HOW DO CANCEL/DELETE message from Newsgroup server??
Once email is sent, it cannot be deleted before reachign recipient's address (unless you own server at recipients' end which is extremely highly unlikely) So just as with spoken word, be careful and dont' allow emotional rushes to result in spontaneous email you may regret later. But my question is about Usenet/Newsgroups (NNTP protocol): Is there a way to cancel/delete you rown posted message, at leas tbefore any followups appear (or even after)? As you all know, most of us hate Web Forums and we remain loyal to Usenet. But I have to admit, there's ONE fea...

delete or void unposted cash receipts using econnect 8.0
I need to delete or void unposted cash receipts exist in table RM10201 using econnect. The class which is provided in econnect to void documents “taRMVoidTransaction” works on table RM20101 only which is for posted documents. ...

increase total rows
Hi, can someone show me how to increase the maximum number of rows, more than 65,536? thanks Stan I presume you have Excel 2007? Open your .xls file in Excel 2007, save the file as an Excel 2007 file type (.xlsw, .xlsx, etc) using File Save As. Close the file and reopen it you should now have 2007's 1M+ rows available. "Stan" wrote: > Hi, > can someone show me how to increase the maximum number of rows, more than > 65,536? > thanks > Stan Thanks!!! "JLatham" wrote: > I presume you have Excel 2007? > > Open ...

Exchante 2000 deleted public folder
Using Exchange 2000 a client deleted a public folder called say AAA by mistake. It staff member. Therefore the folder had an email address of AAA@xxx.nsw.gov.au. We found an old PST and tried under exchange admin to recreate the folder. It kept saying email address already exists. Found under AD users/computers advanced the Exchange folder and found the object for this folder. How do we recreate the folder using the same email address. This email address is published on our website so we cannot change it. Urgent any hep accepted -- Kath On Tue, 30 Nov 2004 23:41:03 -0800, Kaddi...

cannot delete inbox messages
When deleting messages from the inbox they go to the deleted folder but will not delete from the inbox folder. I cannot find any information or any setting that will change this. Please let me know what direction I should take. Rob <Rob@discussions.microsoft.com> wrote: > When deleting messages from the inbox they go to the deleted folder > but will not delete from the inbox folder. I cannot find any > information or any setting that will change this. Please let me know > what direction I should take. So, you're saying that you delete an item from the inbox and ...

How do I find quotes to put in a card?
In creating greeting cards, how do I find quotes in Microsoft Publisher to insert in the card. At times quotation may be from various poets. http://www.bartleby.com/ Several quotation links there. Also..remember Google is your friend. "Claudette Sinclair" <Claudette Sinclair@discussions.microsoft.com> wrote in message news:095A66C7-7672-497E-9842-E7945533658C@microsoft.com... | In creating greeting cards, how do I find quotes in Microsoft Publisher to | insert in the card. | | At times quotation may be from various poets. How about a google search for quotations? ...

where do I find the current user in crystal reports
Hi NG, topic says everything :-) Nicolas F�hrs Many Places Depending what you want to know? Active Directory, Deployment Manger, Web Cleint Top Left=20 Corner, OUTLOOK, Settings-Business Units-Users... Q >-----Original Message----- >Hi NG, > >topic says everything :-) > >Nicolas F=FChrs > > >. > ...

Q on how to find best combination of values
Greetings all, I'm trying to find a way (an algorithm) for determining this: Maximize the value of A Keep B < 10 Data: A B F1 9 4 F2 11 6 F3 10 6 F4 10 3 F1 is 'fraction 1' I can do this manually in Excel, but when I go to larger data sets it'd be a huge pain. Does anyone know of an algorithm or a way in Excel that I could easily do this? I'm thinking that it'd take some macro programming in order to do it, but first I need an algorithm. Even if I couldn't do it with Excel/macros I'd still like to know how to do it. It's been a long time since I&#...

email by rows
hello All: I'm looking for a macro that will go down a sheet and look for th email address and mail every thing in that row to *ONLY* that person n matter if it has 10 columns or 20 columns I have a sheet set up lik this Employee Name LAB Degree Section E-Mail Address paper1 paper2 paper3 I will be adding more columns as the year goes on that is why it nee to be able to send different size rows. Any help would be appreciated Dal -- Message posted from http://www.ExcelForum.com Hi DaleL Which mail program do you use -- Regards Ron de Bruin http://www.rondebruin.nl "D...

Use Find and Replace in Excel
I have the following in cells after using a formula. #INVALID_DATA. The reason is there is no data in the cell. If i use the Find and Replace to remove the unwanted data in the cells I first use the find all command. I change the Formulas to Values. I can see the unwanted data at the bottom. I then use the Replace command. At that time I try to change the Formulas to Values. There is no Values under the replace. There is a Values in the Find section. What do I do to replace #INVALID_DATA in the cells with nothing, like using ""? I do not know what #INVALID_DATA is. Th...

How do I insert a row of blank cells?
I need to know how to insert a row of blank cells every other row in the columns from F to I ONLY!!! I currently have just a straight set of data in those columns like data-data-data-data-data-data. I need to have it alternate data-blankrow-data-blankrow-data-blankrow- as I go down from row to row. I need to do this for about 1000 rows so I need a quick way to do it if there is one. HELP!!! Looks like this: Data Data Data Data I want this: Data Data Data Data Thanks. Chris -open the VB editor -double click the sheet of interest -View from the menu--> Code -Paste the belo...

where can i find a list of excell formula's?
where can i find a list of excell formula's? You can find most of them in Excel's Help. You can also find them in a category view by going to Insert->Function in Excel. What is it that you are trying to do? "macart" wrote: > where can i find a list of excell formula's? Peter Noneley has a worksheet with an example for each function that he includes. The starting sheet is a list of functions. Excel Function Dictionary -- by Peter Noneley, A reference to definitely download and maintain on your computer, workbook with 157+ sheets, each with an explanation an...

deleting extraneous toolbar buttons in Toolbar Editor?
Okay, this is the first time I've added a toolbar to a dialog-based application. When inadvertently resizing the bitmaps, this became interpreted as adding a button. Is there a way I can delete extra buttons without recreating the ones I want to save/use? Thanks. Try the delete key after selecting the button or simply dragg them off the toolbar. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Jim" <Jim@discussions.microsoft.com> wrote in message news:F61A6C02-57F2-44EE-BC16-ABFE9D581D22@microsoft.com... > Okay, this is the first time I've added a toolba...

Macro to shift all source data in a chart by one row or column?
Hello all, I have a spreadsheet which contains at least twenty years of data and twenty or thirty charts. Each year we update all of the charts to move the forecast period to the current year and the next five years. Because there is data well beyond the five year period, a dynamic range for the chart data would not work. Can anyone suggest if it is possible to write a macro which I can run on each chart to shift the source data for each series in the chart by one column or row to the right? Any suggestions would be gratefully received! Thanks in advance, Shan try this defined ...

Excel
I have 2 sets of data - Table A name date Start # End# Price Qty DDA 3/1/2007 100 150 $75.00 4 DDA 3/1/2007 151 200 $45.00 4 DDA 3/1/2007 201 250 $25.00 4 DDA 8/1/2007 251 300 $90.00 8 DDA 8/1/2007 301 350 $20.00 9 BBD 8/1/2007 351 400 $55.00 21 BBD 8/1/2007 401 450 $58.00 54 BBD 7/7/2008 451 500 $60.00 28 BBD 7/7/2008 500 550 $74.00 9 and Table B Name1 Date1 Number DDA 3/1/2007 115 DDA 3/1/2007 121 DDA 8/1/2007 254 DDA 8/1/2007 345 DDA 3/1/2008 388 BBD 8/1/2007 229 BBD 7/7/2008 458 DDA 3/1/2007 298 BBD 7/7/2008 508 I am trying to write a lookup function that will tell me...

Grouping consecutive rows/columns in different groups
Hello, I am trying to use the group command under the data menu: I want to have one group for rows 1 -5 and a different group for row 6-10. Everytime i group 1-5 then i try to group 6-10, it creates on group of rows 1-10??? How do i keep these groupings seperate -- Message posted from http://www.ExcelForum.com HI, I'm not sure this is best, but if you insert a line between row 5 and 6, then group, they'll be separate. jeff >-----Original Message----- >Hello, >I am trying to use the group command under the data menu: >I want to have one group for rows 1 -5 and a differ...

Counting rows that fit within a range
I've got what seems to be a simple problem to do by hand (if it weren't for the fact that the table in question isn't exactly small). So I was hoping I could do it (somehow) in an Excel spreadsheet. What I have, is a column of numbers (to one decimal point), assumed to be sorted in descending order. I want to have another column (calculated by Excel) that will count how many rows have a larger value (in the first column) than it, but only up to a certain range (by adding a constant to the value of that row). For example, here's some data, with the first column supplied by ...

How to increase max. Row count in an Excel sheet?
Is there any way to increase the max row count in Excel 2000? No. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Adarsh Sharma" <adarsh_4u@hotmail.com> wrote in message news:591e01c42d46$d3788c70$a501280a@phx.gbl... > Is there any way to increase the max row count in Excel > 2000? > Hi no way -- Regards Frank Kabel Frankfurt, Germany Adarsh Sharma wrote: > Is there any way to increase the max row count in Excel > 2000? ...