Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Delete Rows Column F If Greater Than Or Equal To Zero.

Starting in cell F3, if Column F is greater than or equal to zero, delete the entire row and continue deleting rows until Column A has contents in it. Then go to Column F in that same row that had contents in Column A, if the contents in that row of Column F are greater than or equal to zero, delete the entire row and continue deleting rows until Column A has contents in it. Persist with this pattern until every row in Column F has been checked.

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Delete Duplicate Rows Where Column A And Column B Combined Are Equal
I have a sheet where i want to delete duplicate rows where column A and column B combined are equal, i.e. range(Ax:Bx) where x is the current row. I am using the macro below but cant seem to get it working as I keep getting a type mismatch error and Im not sure why.

View Replies!   View Related
Delete Rows :: Amount Is Less Than Or Equal To Zero
Located in column W are amounts. if this amount is les than or equal to zero, I want to look at column A to see what account number is associated with that amount. then delete any row with that account number and also any empty row that may be directly above it.

View Replies!   View Related
Delete Prior Rows If SUBTOTAL Equal Zero
I have a large spreadsheet with 25 columns.
I need a macro to delete prior rows if SUBTOTAL in column K equal zero.

View Replies!   View Related
Macro To Delete Rows Including Value Greater Than
I am currently working on a project that adds shoes to a re-order list, and a receipt automatically when they are 'purchased'.
The re-order list is great as the shoes 'purchased' are supposed to be added one after another, my problem being that the receipt is for a customer.

Once the shoes 'purchased' are added to the receipt it can be printed. I then need to be able to clear the rows with values greater than 0 so that I can start with a new customer, on a clean receipt. I need it to check starting from row "A3" so that my receipt format is not messed up, and for it to finish leaving 2 blank rows so that my other macros still work.

I would like to use a macro to clear the rows to make it easier for the user.

If anyone has any suggestions I would be very greatfull and if you require the document I can arrange for it to be sent via e-mail.

View Replies!   View Related
The Smallest Value That Is Greater Than Or Equal To
I am looking for a function like MATCH if the match type were set to -1. However my data is sorted in ascending order. I am mining data from a Pivot Table, and it has dates across the top. Of course the pivot table will have the data sorted in ascending order from left to right. I want to find the first date that is greater than today. With weekends and holidays I can't just use TODAY()+1. Is there a function that can do what I am asking? Also I do not want to change the pivot table itself.

View Replies!   View Related
Greater Than And Less Than Or Equal To Formula
I need a formula that looks at the total in H40 and if the number is between 32 and 40 I need it to return the number then if the number exceds forty I need to multiply the overage by 1.5 and add it to the 8 for a total of 11.

I think it would be something like:


View Replies!   View Related
If Statement (equal To And Greater Than)
If A7 is equal to and greater than 95% than B7 is equal to "A". If A7 is equal to 91% but less than 94.99% than B7 is equal to "B"...

View Replies!   View Related
Greater Than Equal To With Autofilter
I am creating my first Userform and having some problems. I take the data supplied by the userform and try to match it as closely as possible to a row of information. Currently I am using four cells to autofilter my spreadsheet data. Two of the cells I am looking for a exact match. The other two cells I am looking for the number that has been input or anything greater than it. Here is the code I have come up with...

View Replies!   View Related
If Greater Than Or Small Than, Or Equal To
I have a cell, M87. The score in M87 can be less than 13 or greater than 25. I need a formula within M94 which refers to M87, and outputs depending on the the following criteria. If M87 is less than 13 then output as D. If M87 is 14, 15, 16, or 17 then output as C. If M87 is 18, 19, 20, 21, 22, 23 or 24 then output as B. If M87 is greater than 24 then output as A.

View Replies!   View Related
Date Calculation Greater Than Or Equal To
I have start date(Column A) and an end date(Column B) in two columns and I have found out the difference between them in column C in hh:mm:ss format. I want to find out how many cases are greater than 2 Hrs but less than or equal to 4 Hrs.

View Replies!   View Related
Less Than, Greater Than, Equal To Conditional Formatting
i'm trying to create a markscheme progress sheet.

You take a childs actual age in months and years (ie 9.8 for 9years and 8months). They then, in theory, should be at that age level for reading and spelling.

I have the age in B4, the reading in C4 and the spelling in D4. If i use CF to say i want C4 to be red if it's less than B4, Amber if it's the same and green if it's over, as soon as i okay it, C4 goes amber, because it's equal to B4, which is blank. I can get the colours to work, i just can't figure out what to put to turn the amber off when cell B4 is empty.

I've tried as many combinations as my little amount of excel knowledge can cope with.

View Replies!   View Related
Count Values Greater Than Or Equal To Zero
How can I count the number of cells in a range that contain values that are greater than or equal to zero?

View Replies!   View Related
VLookup :: Equal To Or Greater Than The Minimum Amount?
I am revising a spreadsheet to automate some cells and size cable for my job. I am currently using the VLOOKUP command to search a table for the proper ampacity and return a cable size based on the minimum circuit amps. The problem however is the VLOOKUP command searches for a number equal to or less than my circuit amps and returns this cable size. I need it to return a size equal to or greater than the minimum circuit amps. How do I get it to lookup something equal to or greater than the minimum amount?

View Replies!   View Related
Copy Rows Where Date In Column Is Greater Than Today
I have been working on this issue for some time, searches let me down paths to tell me of the color of the cell, but can't put all the pieces together. What I am trying to do, is upon Clicking Command Button 1 it will go row by row of column D (there are 2 headers so D3 would be the first fillable data) looking for dates that is past todays date, if past, it will color the cell red then copy it to the next available row in sheet2 then continue, date past due, color red, copy entire row to sheet 2 looping until the end is reached

View Replies!   View Related
Counting Number Of Dates Equal To Or Greater Than A Said Date
In my Excel spreadsheet I enter todays date in a single cell (A2), then I list various dates that jobs come into shop in other cells (A8:A108). I have cells ( F8:F108) where I have been manually entering an asterik (*) for those jobs equal to or greater than five days old in cell (A2). Is there a formula that can do the math for me? I've tried Excel help but to no avail.

View Replies!   View Related
Delete Rows Where Cell Doesn't Equal Adjacent Cell
I have a sheet in Excel 2004 for Mac that is a patient list with over 2000 patients. I need a rule that will compare values (patient IDs and responsible party ID) in two adjacent cells, if the values are different, to delete the entire row. The goal is to get rid of patients (rows) that are not the responsible party (responsible party ID).

View Replies!   View Related
Grow Denominator Ratio By Fixed Percentage Until Equal Or Greater Than
I have what may be a math question as much as an Excel question. See my attached spreadsheet example in which I grow the denominator of a ratio by a fixed percentage until it equals or exceeds the numerator. This results in the denominator being grown X number of times.

View Replies!   View Related
Cell V7 To Tell Me If The Number In U7 Is Greater Than Or Equal To The Individual #'s In Cells U7-U40
I am using cell V7 to input the formula but I want cell V7 to tell me if the number in U7 is greater than or equal to the individual #'s in cells U7-U40 and I would like it to put a 1,2,3 in the cells of V7-V40 for the three highest numbers in order of largest to smallest if is this possible?

View Replies!   View Related
Countif- Where Column A Is Equal To A Specific Number And Column B Is Equal To Another Number
I'm trying to count if there are situations where column a is equal to a specific number and column b is equal to another number.

both columns are numbers. Does anybody have a good idea how to do this, maybe countif, but i am not sure how to do more than one item with that.

View Replies!   View Related
Delete Rows Between 2 Keywords In Column
I want to delete entire rows between two keywords.


Row 1 Connecting
Row 2 aaa
Row 3 bbb
Row 4 Unavailable

I want to delete rows 1 through to 3 and loop it until the worksheet is completed.

View Replies!   View Related
Delete Rows If A Value In Column A Appears Only Once
I was wondering if it is possible to delete rows if a value appears only 1 time in a column? To clarify since 123 only appears once in column A I want the entire row 4 deleted.

View Replies!   View Related
Filter And Delete Any Rows Where There Is A Value In A Column
I have written some code that will allow me to filter and delete any rows where there is a value in a column ( column J in this instance ) more than 2500. The problem is that it only wolrs when i press F8 and step through the code, and not when i press the commnd button and run it.

Do Until ActiveCell = "Payment Amount"
ActiveCell.Offset(0, 1).Select

Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
If ActiveCell > 2499.99 Then
End If
End Sub

View Replies!   View Related
Trying To Delete Rows That Have Text Only In Column
I have a spreedsheet that has both numerical data and text data in column "A". I need to delete all the rows that have text in Column A and keep the rows that have numerical data.

View Replies!   View Related
Delete Rows If Corresponding Column Is Blank
I am trying to delete rows that do not have values in column B. This is a quote form that takes up over 1000 rows but not all are needed (ie lines that do not have any value in B "qty"). Is there a way do have excel delete these without doing it manually?

View Replies!   View Related
Delete Subtotal Groups That Equal Zero
I want to delete the rows containing a subtotal of zero and the rows above it related to that grouping.

PO numbers are assigned to the data so the grouping is on the PO number column.
The subtotal numbers are two columns over.

The workbook is close to excel's row limit so I want to eliminate the PO rows that have zeroed out. So, the row with the value of zero and the rows with the same PO number.

View Replies!   View Related
Check Range; If Equal To X, Y, Or Z Then Keep Else Delete
I am trying to search a column for specific values.... if the cells in the column equal X, Y, or Z then I want to keep them. Anything else, should be deleted....and not just the cell the entire row that it is in.

So I'd like it to search column E for a number of different values, if equal keep the data. If not (say E6 is not any of those values) then delete that row (all of row 6)

View Replies!   View Related
Delete Row When Cell Not Equal To Another
The code below is an attempt to delete all rows where the cell in column A is not equal to the value of B1. B1 is text if that somehow makes a difference.

Dim n As Long, lastrow As Long
lastrow = Range("A65536").End(xlUp).Row
For n = lastrow To 1 Step -1
If Cells(n, 1) <> Range("B1") Then Cells(n, 1).EntireRow.Delete
Next n

Do I need to specify that B1 will always be the cell to reference (ie $B$1). Edit: Just had an epiphany, I also need it to stop after Row 3. I have some headers and such that I don't want removed.

View Replies!   View Related
Keep Only Doubles Of Cells In A Column, Delete All Other Rows
I need a macro that keeps any row that has a cell value that shows up twice and only twice in column A. All other rows would be deleted (except the header row, row 1). For example, If it's found only once, a third time or more than three times, delete those entire rows.

This is different than "keeping only duplicates" which would be 2 OR MORE.

A couple of things,

1. The workbook might not be sorted by column A, so a cell named "ABC0011" could show up in row 3, then again in row 8, in this case, keep both.

View Replies!   View Related
Delete Rows :: Where The Corresponding Entry In Column Is Blank
I have data input in a particular column, say Column C.

I would like to have a macro that deletes the rows where the corresponding entry in Column C are blank.

In addition, there are multiple worksheets with the same data format in the same spreadsheet, but the number of row varies. It would be great if the macro can delete the row with blank cell in that column across all worksheet.

View Replies!   View Related
Delete Any Rows In Which Column B Doesn't Have ...
I'd like to tell Excel that anytime it finds the text "ABC" anywhere in any cell in column B but doesn't have any data in column A, to delete the entire row.

View Replies!   View Related
Delete Rows Until, Total Found In Column
Is there a macro that will begin in cell A2 and delete rows until the contents “Total” is found in a random row in Column A?

View Replies!   View Related
Delete ALL Rows That Have Cell In Column (J) That Looks Blank
I'm trying to delete rows which has columns that appears to be blank. Below code worked fine but it took about 15 min for the macro to work through the spreadsheet.

View Replies!   View Related
Delete Rows Based On Condition Of 1 Column
I would like to Use my Excel VBA program to search each row in a csv document for a name (located in a cell ) if the name exists then I would like to delete the entire row.

Whenever I try to do the above in excel, even when I save in csv format the file formating or something gets changed and the file which has to be procesed through another program then process incorectly.

Is there a way to do what I need while retaining the formating which must obviously be changed when the file is opened in excel?

View Replies!   View Related
Delete Rows Based On Flag In Column
I want to get a Macro to delete all rows wherever "DELETE" appears in a certain column - I tried using the Delete Entire Row Based on Criteria Macro on Ozgrid but I'm looking for a fully automated solution, rather than the question boxes coming up and asking which cell/criteria to use. The spreadsheets I'm using this on are big, so because this Macro uses filters, it takes a long time and I also need to run this macro on multiple sheets so its not practical to use this.

DELETE is just the word I'm using as the TRUE statement generated from an IF formula that I'm using to compare cells in adjacent rows ie =IF(AND(E2=E3,G2=G3,Q2=Q3),"DELETE",FALSE) - Its completely fine for me to copy/paste values of this formula first and then sort the column so that all cells containing DELETE will appear at the top of the column if that helps. Any ideas on how I could get a Macro to delete those rows at this stage?

View Replies!   View Related
2003 Delete Rows With Specific Value In Column C
I need a code that will go thru column C and delete the whole row if cell value is 78315, Also it needs to shift the the rows up so there is no empty rows wheneverything is done done. I used some codes but they take forever to go thru whole sheet.

View Replies!   View Related
Delete Rows Meeting Criteria In One Column
I have a large number of user inputs which is linked to a data sheet. In this sheet are rows to be kept and rows to be deleted. See attached example...

I need code to delete all other similar rows than the one with a number (1) in the field Complete. There can only be a number (1) in the field Complete in one of the rows.

But if there is no number (1) in the field Complete in any of the rows, no rows should be deleted.

The data sheet is to be transferred to Access afterwards.

View Replies!   View Related
Delete Rows Based On Date Column
modifying the following from deleting rows older than 365 days to delete rows older than 12 months. So I can keep a rolling year by month.

Sub DeleteOldSR()
Dim x As Long
Dim iCol As Integer

Application. ScreenUpdating = False

iCol = 7 'Filter on column G (Create Date)

For x = Cells(Cells.Rows.Count, iCol).End(xlUp).Row To 2 Step -1
s = Cells(x, 3).Value
If s Like "Closed" Or s Like "Closed w/o Customer Confirm" Then
If Cells(x, iCol).Value < (Date - 365) Then
Cells(x, iCol).EntireRow.Delete
End If
End If

Application.ScreenUpdating = True

End Sub

I tried modifying the IF statement using month with the following but it seems to delete all months < and is not year dependant.

If Month(Cells(x, iCol).Value) < Month(Date) - 12 Then

View Replies!   View Related
Delete Rows Meeting Criteria In A Column
I have searched for this topic, and I have read, I don't really understand it though. I think what I want is simple, I want to search column A for cells containing the word " Total" - if any are found I then want to delete the corresponding rows.

View Replies!   View Related
Delete Duplicate Rows Based On 1 Column
creating a macro for an excel spreadsheet? The problem I am faced with is I need to reduce a xls file from a ticketing system at work that contains roughly 50,000 rows.

What I need to have done is reduce a Site Code column (column B) so that for each ticket entry there is only one occurrence of each user that worked on that ticket.What the macro should do is to look through column B and remove any duplicate rows for the same ticket number located in column A. once the macro gets to the next ticket number in column A I need it to start over on the duplicate check for column B.

I have a attached a xls file to this post to try and show what it is i am working on.

View Replies!   View Related
Delete Rows With Specific Text In A Column
I want to delete any/all rows from a worksheet (named UK) which have the word "VAN" in column P. I have tried using a 'For Each... Next statement' in a macro, but always get a debug box "Run Time Error '91' Object variable or With block variable not set". What am I doing wrong? my code follows

Dim cell As Range
For Each cell In Worksheets("UK").Range("P10:P200").Cells
Cells. Find(What:="VAN", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False, _

View Replies!   View Related
Delete Non Numeric Rows Based On Column
The attached picture shows part of an excel file. It contains about 50.000 rows which I want to run a pivot on. The problem is though that the file contains some rows which stop my pivot from running correctly. These data which I mention are in rows 4, 7, 22-25. Seeing as deleting them manually would take me hours and hours I was wondering if there would be a macro which I can run which delete rows automatically. I think it should filter on the following: whenever there is not a numeric value in column A, the entire row should be deleted.

View Replies!   View Related
Find Value In Column & Delete All Rows Below
I have searched high and low for a more efficient macro than the current loop i have. I have a range that varies in size but always follows the same format. After i reach a certain value output from a formula, "4", I want to delete all lines below that line. So I want to find value "4" then move one row down and delete all lines to line 2004. I have attached the macro that i compiled but it takes a couple of minutes to run.

Sub manual()
Dim Firstrow As Long
Dim Lastrow As Long
Dim Lrow As Long
Dim CalcMode As Long
Dim ViewMode As Long
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
. ScreenUpdating = False
End With
With ActiveSheet
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView.................

View Replies!   View Related
Date Differences (check For Less Than 6months, Equal To 6months And Greater Than 6months)
I am trying to make a condtional formatting to a cell, so that it will change colour depending on the time since the date in the cell. I am trying to check for Less than 6months, equal to 6months and greater than 6months.

View Replies!   View Related
Delete Entries In A Range That Equal 0.0000%
I have a very big range of data from B4, to a variable other end from which I would like to delete all entries equal to 0.0000 leaving just those with an entered value.

I guess it's just an if question cycling through the rows and columns? Slight complication is it's on the 3rd sheet of a Workbook, as set out in the sample file.

After this manipulation has been done, I then wish to copy the data from the range B4: end of data into the same cells in the output sheet.

View Replies!   View Related
Vba To Delete Rows Based On Certain Conditions In Column A
I have a report in which I need to delete the entire row for each cell in Column A that has the name "Defacto" in a certain location in that cell. I am trying to use VBA code in conjuction with the "MID" function [i.e., Mid(Cell.Value, 8, 7) = "Defacto"]. This is the code I came up with (but, obviously, it doesn't work):

Sub DeleteRowOnCondition()
Range(ActiveCell, ActiveCell.End(xlDown)).Select
For Each Cell In Selection
If Mid(Cell.Value, 8 , 7) = "Defacto" Then Rows.Delete
Next Cell
End Sub

As well, there is another worksheet in the same report in which I need to delete all the rows that do NOT meet that condition (while retaining the ones that do).

View Replies!   View Related
Move Column Data To Row Then Delete Those Rows
We have a client that provided us with a text file that we imported into
Excel. Rather than have the entire record in one row, they have the record
in 4 rows.

What I need a macro or something to do is move award 2 award 3 and award 4 into the same row and after doing this delete the other rows.

Below is an idea how this looks.
1JohnSmithstreetcitystateZIPaward 1
2JohnSmithstreetcitystateZIPaward 2
3JohnSmithstreetcitystateZIPaward 3
4JohnSmithstreetcitystateZIPaward 4
5BillJonesstreet2city2state2ZIP2award 1
6BillJonesstreet2city2state2ZIP2award 2
7BillJonesstreet2city2state2ZIP2award 3
8BillJonesstreet2city2state2ZIP2award 4

What we need for our data to work is:
1JohnSmithstreetcitystateZIPaward 1award 2award 3award 4
2BillJonesstreet2city2state2ZIP2award 1award 2award 3award 4

View Replies!   View Related
Delete Duplicate Rows Using Data In Column A As Criteria
I have a spreadsheet that has thousands of rows of data with maybe 6 columns.

I would like to remove the duplicate rows but the problem I am facing is that I would like to use column A as the criteria.

There are some duplicates in column A but the issue is that the data in column B, C, D, etc may not be the same for each duplicate.

Easier to see in this image:

So A1 is the same as A6
A1 has data in B1 and C1, no data in D1
A6 has data in B1, C1 and D1

I need to delete either row A1 or row A6, it is irrelevant which row it is but one of them has to go.

View Replies!   View Related
Delete Rows Where Cell In Column Is Repeated X Times
I have a excel doc with 8000 names I need to delete the people who are listed on 7 rows.

There are no blank rows and Colume A has the names sorted.

View Replies!   View Related
Find Text In Column & Delete All Rows Below
I am trying to create a macro that will delete everything below a certain word.

The code I tried to use is the following. This produced an error:

If Range(Cells(1, 1), Cells(180, 1)). Find(" Interest Expense").Row = 0 Then
iStart = Range(Cells(1, 1), Cells(180, 1)).Find(" NET INCOME").Row + 1
iStart = Range(Cells(1, 1), Cells(180, 1)).Find(" Interest Expense").Row + 1
End If
Rows(iStart & ":" & FinalRow).Delete shift:=xlUp

View Replies!   View Related
Delete Rows If Opposite Column Cell Matches
I have a spreadsheet that is updated daily with data that falls into one of two categories: a) completely new to the sheet or b) existing from the day before but not taken care of yet. The items which fall into category a are evaluated, and notes added to the sheet. The items in category b must be compared to the new data, and duplicated lines deleted but notes from previous evaluation must be kept on the sheet. In addition, anything on the sheet that is not included in the new information needs to be deleted. I've set up a sheet with all old and new data with dates the data showed up as well as the notes associated with the old data, and have concatenated all the info from each row into column V (from another suggestion I got on a similar but not exactly the same problem which I also still haven't figured out). The sheet has been sorted by col V so any matching rows should be within 3 or 4 rows of the original. The problem is that my code does absolutely zilch!

Sub DeleteRepeatedRows()
' goes through coord. sheet and identifies duplicated lines, copies the date from the old row
' copies it into the new line, then deletes the old line
Dim rCell As Range
For Each rCell In Selection
If rCell.Value = rCell.Offset(1, 0).Value Then
End If
If rCell.Value = rCell.Offset(2, 0).Value Then
End If.........................................

View Replies!   View Related
Copyright © 2005-08, All rights reserved