Dual-Condition Row Auto-Delete Macro

Jul 10, 2008

I browsed the first few pages of searching for "row delete macro" and couldn't find anything that suited my needs very much, so here goes:

What I need to do is automatically delete rows where the entries in column B (date) and column E (string) are the same. It is a very large group of data, so filtering is not exacly an option here.

Here is the twist on it...

I have a column F that contains either "Accepted-Active" or "Accepted-Closed". If I delete a bunch of rows that contain the same column B and E entries, I want to save the row that contains "Accepted-Closed", otherwise I don't particularly care which of the rows is saved.

View 9 Replies


ADVERTISEMENT

Dual Condition Lookup Over 20000 Rows

Apr 30, 2009

I have a 20000-row sheet generated by a daily report and I only want to work with about a quarter of this data; any rows that contain "PH4" in the M column. What's the best way to automatically single out this data to work with?

My initial solution was to create a seperate sheet to pull off all the columns with PH4 in the M cell, eg cell A8 would be:

=IF([WEB_StoSta_Rep.xls]Sheet1!$M8="PH4",[WEB_StoSta_Rep.xls]Sheet1!A8,"")

Then I could run lookups off that sheet. However, this feels like a sloppy solution to me, and Excel throws up an error when saving, unable to save external link values with available resources. Is there a better way of going about this?

View 10 Replies View Related

Macro To Delete Rows With A Condition

May 28, 2009

What I need is a macro to delete a row or rows for a specific range of cells (eg. E20 to E58) when the cells in that range column E is = blank. The cells in column E is formated with a currency sign $. Deleting the row should shift up all rows below. I need to run this macro manually. Excel 2002 SP3.

View 9 Replies View Related

Macro To Delete Rows If A Certain Condition Is Met

Jan 6, 2009

I want to create a macro the will delete all the rows in a sheet if 1 of 2 conditions are met. The first condition is if a cell is blank or if a cell contains the word "negative"

View 9 Replies View Related

Macro To Delete Rows That Fill Certain A Certain Condition

Jun 25, 2007

How do I have the marco delete rows if the O column = a certain cell.

For instance my O column has a bunch of colors

Cell N1 list one color (red) and I want the macro to delete the rows that contain the color from N1 in column "O".

View 9 Replies View Related

Delete Auto Open Macro

May 28, 2008

I have a excel file in which , there is probably a macro which runs when i open the file. The macro checks for a particular file on the D: drive.

I want to delete this macro. The problem is i cannot delete this macro, as it is not appearing in the Macros List.

Also i know i can disable this macro, by pressing the shift key whenever the file is opened.

But i want to delete this macro permanently from this file. I have tried various options like pression Alt-F11 & to locate the macro in module etc & also tried to locate it in the Workbook open event handler. But I cant see the macro.

How do i locate this macro & delete it.

View 9 Replies View Related

Speeding Up An Auto-delete Macro

Jul 14, 2008

Delete rows where column A and B are duplicated.

However, this runs extremely slow. I had to stop it after about 10 min, as it only got to about row 1000 of 20,000.

Sub Delete_Dupes()
Dim rw1 As Long: rw1 = 1
Dim rwx As Long: rwx = rw1
Dim stepx As Integer
Dim co1 As Integer: co1 = 1
Dim co2 As Integer: co2 = 2
Dim bool1 As Boolean
Dim bool2 As Boolean
Dim bool As Boolean
Dim count As Integer
count = 0
Do Until Cells(rwx, co1) = ""
stepx = 1
If rwx > rw1 Then
On Error GoTo NewCrit
bool1 = IsError(Application.WorksheetFunction.Match(Cells(rwx, co1), Range(Cells(rw1, co1), Cells(rwx - 1, co1)), 0))
bool2 = IsError(Application.WorksheetFunction.Match(Cells(rwx, co2), Range(Cells(rw1, co2), Cells(rwx - 1, co2)), 0)).................

View 9 Replies View Related

Email Dual Sort & Find Macro - Triple Function

May 20, 2008

I'm looking for a macro that can sort emails by 2 very distinct ways, with 1 special find function as well. Not too much eh? ........

View 9 Replies View Related

VBA Macro To Delete Rows/Columns, Insert Formulas & Auto Fill

May 28, 2009

I'm running a macro that opens another workbook and read data from it.How can I incorporate this code into my macro.Sorry i don't knwo VBA.

Workbooks.Open Filename:="C:Documents and SettingsmsimantbDesktopINFRACHEM_POLYMERS - DON''T DELETE.xls]Sheet1"

UserGRP_MAcro Macro
Rows("1:3").Select
Selection.Delete Shift:=xlUp
Columns("A:B").Select
Selection.Delete Shift:=xlToLeft
Columns("B:E").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").EntireColumn.AutoFit
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("B1").Select
ActiveCell.FormulaR1C1 = "Existing userGroup"............................

View 2 Replies View Related

Get (tabs) Of Action Log To Auto-populate And Auto-delete In Master Log

Jul 29, 2014

I need the tabs of a project action log to auto-populate and auto-delete in a master log. (So when something is added or deleted in a tab it is added or deleted on the master) I use excel a little bit for work and personal finance purposes but I have zero experience with macros or VBA.

View 1 Replies View Related

Auto Complete And Auto Delete With Data Validation

Jan 7, 2008

Within a data validation selection, are you able to do both Auto Complete and Auto Delete? I have this posted at another forum [url]but have not been able to find a solution (a copy of the file, test. zip is there as well). I am not sure it is possible, or, at least I have been unable to get it working. I can do each, but not both.

I have also been utilizing:

[url]

[url]

View 5 Replies View Related

Auto Email If Condition Met

May 23, 2006

I can get it to work with 1 email and 1 condition but not 2.

Sub auto_open()
ThisWorkbook.Worksheets("Sheet1").OnEntry = "DidCellsChange"
End Sub

Sub DidCellsChange()
Dim KeyCells As String
KeyCells = "A1:A99"
If Not Application.Intersect(ActiveCell, Range(KeyCells)) _
Is Nothing Then KeyCellsChanged
End Sub ................................

View 9 Replies View Related

Auto Fill Series Based On Condition ..

May 18, 2008

Auto fill series based on Condition.(Excel 2003)

I know very little about macros (basically just concepts). I found this macro suggested in another thread (posted By VoG II…Thanks)

Sub test()
Dim Lastrow As Long
Lastrow = Range("A5").Value + 4
Range("B5").AutoFill Destination:=Range("B5:B" & Lastrow), Type:=xlFillSeries
End Sub

When this macro is run the first time it will fill in the numbers 2 through 15 (as I had hoped). Given 15 is the variable and 1 is the start of the range...

View 9 Replies View Related

Auto-populate Sheets Within One Workbook Based On Condition

Dec 20, 2012

I have a single registration sheet that lists names, contact information, and the class someone is in on a single sheet.

(Name, Number, Email, Class 1, Class 2)

I am hoping to automatically populate other sheets in my work book based on classes... essentially making automatically populated rosters. For example, everyone who has Math listed in either Class 1 or Class 2 would have their entire row (with contact information, etc) copied to the "Math" sheet.

View 2 Replies View Related

Auto Fill Series Based On Condition :: Numbers

Jan 19, 2008

I am newer here and I want a macro in mentioned title. I have a number in column a2 and in column b2 quantity if in column a2 number is 2101400 and in column b2 i write quantity 50 so said number automatically fill series in column a like mentioned below...

View 9 Replies View Related

Delete Row When Condition Met

Feb 2, 2009

In a worksheet I have a list starting Col A being the running reference no. such as Action 1, Action 2 and so on. Each time a new action is needed the numbering increased by 1. The next column is the description of the action. This list start at row 39 of this worksheet.

This is a protected worksheet and entry of data is limited to specify cell in the list.

1. Look for the last Action Item.
2. Check if the description column (Col B) is blank.
3. If Col B is blank delete the whole row.

View 9 Replies View Related

Check Delete Condition

Sep 23, 2007

Suppose I have a excel sheet,in this sheet has 7 columns(A to G).I need to do with my sheet with this condition.

-Keep the rows that have the same value of datas in column A,C,G and they must have different datas in column E and F.

-The other row that not same as above condition must be deleted.

View 12 Replies View Related

Delete Rows When The Condition Is Met...

Oct 6, 2008

I'm working this spreadsheet and i want to automate of deleting the entire rows once the last two columns contains both Zero values. the worksheet cotains thousands of row to clean-up.

View 3 Replies View Related

Delete A Row Based On Condition

Dec 14, 2009

I want to delete a row in excel based on a condition.

The condition is as follows:

I have few rows in the excel where the columns 7,12,13,23 are same and column 24 in one row has some number and in some other row the column 24 is blank with orange color filled(the colorindex for orange is 44).

In this case I want the row with orange color filled in column 24 to be deleted.

View 11 Replies View Related

Delete Rows If Condition Not Met

Dec 15, 2009

I want a macro to delete the entire row based on the value in Column Q ....

View 14 Replies View Related

Delete An Entire Row If Condition Is Not Met

May 3, 2006

I'm working on Outlook 2003 and Word 2000 which are not compatible. I have an
Excel Sheet which are my contacts from Outlook and I want to re-work it to
have only a certain category left.

I need a macro that does
- search a certain column
- deletes the row if it does NOT find a certain condition

Ideal would be a little pop up window to enter which category I want left.

View 9 Replies View Related

Delete Cell With Some Condition?

Jun 5, 2014

How to delete cell with some condition?

View 1 Replies View Related

Delete Cells On Specified Condition

May 10, 2008

I have some data in numaric form from range a2:f20000 which I have got as a sum from a sheet and I want if any cell (a to f) from row 2 to 20000 has sum up value blank or 0 then it deletes shift xlleft.

View 9 Replies View Related

Delete Tabs According To Given Condition

Dec 16, 2009

I have an excel workbook with over 900 tabs included. The tabs are named as LS-XXXXXX Ron, LS-XXXXXX Ollie, etc.

I need a macro so that I can delete all the tabs for which the name is
LS-XXXXX Ron. (XXXXXX defines some numbers).

View 9 Replies View Related

Delete Row Based On Condition

Jan 19, 2007

i have an issue i need to delete entire row if a condition is met, i need syntax if possible to delete if a cell word "begins with" a certain letter ...in this case...letter A

column is "O"
must search threw entire row

View 3 Replies View Related

Delete The Column If Condition Found?

Jun 10, 2014

i want to delete the column which are blank

e.g

i have data in Column A1:N1 then delete the column O:Z

View 2 Replies View Related

VBA To Delete Entire Row Based On Condition Met?

Jun 16, 2014

I have table in which against the Column A data values are added in Column B, C and D.

If Column B,C and D cell values is 0, then I want entire row including A to be deleted. How can I do this in VBA?

Note: Column A data begins from Row 15 and below.

Just to avoid confusion. I want row deletion, only when all the three cell on B,C and D is = 0

View 7 Replies View Related

Delete Entire Row Based On A Condition

May 13, 2009

I have a problem deleting rows based on a condition, i didn't know how to use offset method.

i'm using a table like this one :

A B C
1 Main design1 FFR0
2 Extra design2 FFR0
3 Main design3 FFR0
4 Extra design4 FFR0
.
.
n Main designn FFR0


I want to delete entire row if "FFR0" in column C exists in a row beginning by "EXTRA" (column A)

View 6 Replies View Related

Delete Rows Based On A Condition

Jul 20, 2009

Is it posibile to make a macro that automaticaly delete rows based ona a condition. Condition is to delete rows that have B column value "" or zero. For example:....

View 12 Replies View Related

Delete Based On Condition/criteria Using VBA

Apr 16, 2006

I want to be able to delete certain rows based on multiple criteria. If data in the row does not meat the crieteira, it shud be deleted. I have attached the excel file sample in which I want to keep the highlighed rows and detele the rest. Its base on Origin city and Destination city combination. Eg: If Origin city="A" and Destination City = "B", I want to keep the row. Like wise for all highlighted rows. but if the Origin City = "B" and Destination City = "U" I want to delete the row.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved