Deleting Specific Rows ....

Nov 9, 2008

I have created a worksheet (through an import into MS Excel 2007) which contains 287,281 rows. However, the data I need is located in rows: 4, 67, 130, ... (or n+63) rows.

View 10 Replies


ADVERTISEMENT

Deleting Specific Rows..

Feb 21, 2009

Here's my problem. I have the following table:

View 5 Replies View Related

Deleting Entire Rows Containing A Specific Value

Aug 29, 2007

I've been tasked with developing a macro that will generate schedules. For background, we're taking a QuickBooks Customer file and exporting it to be picked up by the macro. I've got that part working, but now I need to delete various rows based on certain criteria.

The spreadsheet has a field for Job Status which we use to define whether an account is under contract (2 in QuickBooks), or some other status. Basically what I need to do is delete the entire row of data where JobStatus (Column R) is anything but 2.

View 9 Replies View Related

Deleting Specific Rows That Are Identical

Mar 8, 2012

I want to delete some rows that are identical. Aside from creating a macros to do this, is there a way to find a row with a specific criteria and delete it if value returns TRUE?

View 1 Replies View Related

Finding And Deleting Specific Rows

Jul 31, 2013

I was wondering if there is a formula or command to find and delet specific rows. I want to remove people from an excel email list.

On Sheet 1, I have 500 rows with columns for first name, last name, and email.
On Sheet 2, I have 30 rows with columns for first name, last name, and email that appear on Sheet 1 but need to be removed.

Is there a way to do this without manually searching for each email and then deleting the row?

View 4 Replies View Related

Deleting Specific Rows In Worksheet

Nov 28, 2006

i need to create a macro that will delete entire rows based on certain criteria. here is an example of some of the worksheet:

US0017651060AMR_CORP CM 12C
US0017658669AMR_CORP PR 8C

US00211H1077ATC_ONLANE_INC CM 92M
US00211H2067ATC_ONLANE_INC PR 100N

US0038813079ACACIA_RESH CM 12C
US0038812089ACACIA_RESH CM 16C

CA00440P2017ACE_AVIATION CM 7C
CA00440P1027ACE_AVIATION CM 7C
US00440P3001ACE_AVIATION CM 100S

CA00756J1049ADVANTEX_MARK CM 43C
CA00756J3029ADVANTEX_MARK PR 100N

i want to create a macro that, when searching the third column of data (containing "CM" and "PR"), if a group of rows (between blank rows) do not contain at least one "PR", delete entire group of rows.

Therefore, the rows with "ACACIA_RESH" and "ACE_AVIATION" would be deleted from the worksheet.

View 9 Replies View Related

Deleting Groups Of Rows When Specific Text Data Is Populating Row?

Feb 14, 2013

I have a complex report with thousands of lines I am trying to clean up. In order to do this, I need VBA that recognizes specific text data starting after row 9. When it sees this, it will need to select and delete the 2 rows above it, the row it is in, and the 6 rows below it. 9 rows in total, some of which are blank. The text will repeat every 47-50 rows, but I cannot say exactly when it will repeat again. When it is repeated, I need the 9 rows deleted. At this time, there is only 1 column in the report because I need to split out the data in the cell into adjoining cells. Since I have not solved that yet, I need to just delete the entire row.

The text is written with spaces between each letter and a double space between words. It reads, "B I L L I N G M A S T E R I N V O I C E S E T U P L I S T I N G"

View 8 Replies View Related

Deleting Last Cell In A Specific Row

Feb 24, 2009

hey everyone

i'm using a table like this one :

A B C D

1 Main | value | value | value
2 Extra | value | value | value
3 Main | value | value | value
.
.
n Extra | value | value | value

i want to delete every cell in column "D" only when cell in column "A" contains "Extra" value.

View 6 Replies View Related

Highlighting Or Deleting Specific Cells

May 16, 2009

I have Column A with 380 cells filled in with numbers (A1-A380) i.e. numbers like..456758, 567848 etc etc

Column B has a subset of those numbers, maybe 80-90 or so (B1-B90).

What I want to do is either highlight the numbers in Column A that also appear in Column B in yellow, OR delete them from Column A altogether

View 8 Replies View Related

Deleting Lines Containing Specific Numbers

May 8, 2014

macro that would keep all lines containing a number greater than zero in column D and delete all of the other lines?

View 9 Replies View Related

Avoid Deleting A Specific Worksheet

May 2, 2006

I have a workbook where everything is controlled from a single worksheet that I named "Start".

In the "Start" worksheet I have instructions and one command button. When this button is clicked, it will start the VBA code. The code will basically show a couple of userforms where the user will input some information and after the user clicks on a button on the last userform, the code will generate new worksheet and present the results in that new worksheet.

The user could do this as many times as he wants, each time creating a new worksheet or overwriting in an existing worksheet (except the "Start" worksheet). The user is able to delete any worksheets he want.

I need to write a code so that if the user tries to delete the "Start" worksheet, it will not let him/her because then there is no worksheet where I have the button to click to start the VBA code.

I tried protecting the workbook, but then it does not allow to add new worksheets either.

View 9 Replies View Related

Excel 2010 :: Delete Filtered Rows Without Deleting The Hidden Rows?

Sep 25, 2012

How do I delete filtered rows without deleting the hidden rows in excel 2010?

View 8 Replies View Related

Clear Rows Vs. Deleting Rows To Avoid #REF! Formula Error - Macro

Jun 9, 2009

I have a macro which is copying data from several worksheets into one consolidation worksheet. When determining where to paste the data into the consolidation sheet, the macro includes some logic to find the last row that has data in it (using e.Range("A65536").End(xlUp).Row, where "e" is a variable holding the name of the consolidation worksheet).

Once all the data is on the consolidation worksheet, I have a second worksheet with formulas that link to the consolidation sheet. The issue I have is that the first step of my consolidation macro deletes all data on the consolidation sheet to ensure that no data is double-counted). I am deleting the data with logic that simply deletes all rows from 3 to 65536. Once these rows are deleted, Excel returns a #REF! error on my second worksheet which is linking back to this data.

Rather than deleting the rows on the consolidation sheet, I have tried using the Clear and/or ClearContents commands instead. This works (i.e., my formulas no longer error out), but results in the consolidation macro running very slowly (~15 minutes, compared to

View 9 Replies View Related

Macro For Finding Specific Word And Deleting It

Apr 2, 2014

I have a excel file with more then 10 sheets..Some of the sheets contains this word in some random cells" #DIV/0! " I want a macro which can find it in every sheet except parent sheet and can remove it.

View 5 Replies View Related

VBA Code For Deleting Columns With 0 Value In Specific Cells

Oct 24, 2008

I am trying to write a VBA code in excel to delete any columns when a cell in that particular column = 0 (zero). That cell would start at B19 and subsequently follow to C19, D19 and so on.

View 9 Replies View Related

Code For Deleting Rows Verses Hiding Rows

May 25, 2013

The first code hides everything just fine based on the date in A1. When I change it to the second code to delete instead of hide it is leaving a bunch of rows that the 1st code hides. Both codes have the same search criteria.

Code:
For Each cell In Range("B8:B5000") If cell.Value Range("A1").Value Then cell.EntireRow.Hidden = True
Next cell

Code:
For Each cell In Range("B8:B5000") If cell.Value Range("A1").Value Then cell.EntireRow.Delete
Next cell

View 4 Replies View Related

Delete Blank Rows (formula Not Deleting All Rows)

Sep 30, 2008

I have the following codes to delete all blank rows in column A

Dim lastrow As Long
lastrow = Sheet1.Range("A" & Rows.Count).End(xlUp).Row
MsgBox lastrow

With Sheet1
For t = 1 To lastrow
If Cells(t, 1) = "" Then
Rows(t).Delete
End If
Next t
End With

End Sub

Although it is working , it is not deleting all the blank rows at once, I have to keep pressing on the macro button running the macro several times, until all blank rows are completely deleted.

View 9 Replies View Related

Deleting Rows Macro :: Rows That Don't Contain Word ...

Jan 9, 2008

I got a code to delete all rows in the sheet which contain the word "DETAILS" but I now want to delete all the rows that do not contain the word "DETAILS"

My code if needed is:


Sub Find_details()
Dim rng As Range
Dim what As String
what = "DETAILS"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Rows(rng.Row).Delete
End If
Loop
End Sub

View 9 Replies View Related

Delete Rows With Specific Characters In A Specific Column

Dec 10, 2007

Currently I am using the Kickbutt VBA Find Function of Aaron, but I would like to have something that works more efficiently. What I currently do is (assuming all possible values for Column J are A - F):

Find_Range("A", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("B", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("C", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("D", Columns("J"), MatchCase:=True).EntireRow.Delete
Find_Range("E", Columns("J"), MatchCase:=True).EntireRow.Delete

although I just want some code that says: delete all rows except those that have "F" as content in Column J. I already tried something like:

Range("1:65536").Select
For Each cl In Range("J:J")
If cl.Text = "A" Or cl.Text = "B" Or cl.Text = "C" Or cl.Text = "D" Or cl.Text = "E" Then
Rows(cl.Row).Delete
End If
Next

but it also takes much to long. The major problem I think, is that the number of records is variable so I search the entire worksheet...

View 5 Replies View Related

Deleting Rows/content Of Rows

Dec 11, 2009

Say I have a method that iterates through a bunch of Sheets. I check the name of every sheet, if it starts with "Data", I need to make everything between A4 and AZ500 empty (either by clearing cells or deleting rows doesn't matter how, as long as the result is an empty sheet below A4).

View 2 Replies View Related

VBA And Deleting Rows

Sep 21, 2009

I have an excel spreadsheet that contains about 1000 rows and about 25 columns. The file contains employee information, name, id, cost center, department, title, FTE...etc. Column E contains the cost center which is a 7 digit number (i.e. 8001234). Within the 1000 rows of data there somewhere to 70 cost centers. I would like to delete all rows where a cost center does not match a list of 13 cost centers. I'm thinking I need some kind of array where I type in the 13 cost centers in the code, but I'm unsure of the syntax within VBA.

Also, the second step of the code I'm looking for is to delete all columns except for Column B, E, J and L. Those, by the way are Name, Cost Center, Job Title and FTE.

View 2 Replies View Related

Deleting Rows That Contain Particular Value

Oct 26, 2011

I want to delete all rows in the column of the ActiveCell when the ActiveCell.value < 0.01. Could you tell me why the code below doesn't work? It deletes the right rows but keeps looping without stopping

Sub DeleteZeros()
Dim Col As Long
Dim StopRow As Long
Col = ActiveCell.Column
StopRow = Cells(Rows.Count, Col).End(xlUp).Row

Range("A1").Select

[Code] .........

View 6 Replies View Related

Deleting Rows

Apr 25, 2007

I have a macro that deletes rows. For some reason, the macro bombs out when the selection seems to be too big. Why is that?

deleterow_min = Sheets("Sheet1").Cells(1, 6)
deleterow_max = Sheets("Sheet1").Cells(1, 7)

Rows(deleterow_min & ":" & deleterow_max).Select
Selection.Delete Shift:=xlUp

View 9 Replies View Related

Deleting The All Rows

Aug 5, 2009

In a part of my code I have something that will delete all hidden rows, like:

For Z = 1 To TotalRows - 1
If Cells(TotalRows - Z, 1).EntireRow.Hidden Then
Cells(TotalRows - Z, 1).EntireRow.Delete
End If
Next Z

I've done it in reverse to be quicker, but it's still quite slow. Granted, I am deleting several thousand rows, but surely there's a quicker way? Thinking about it logically I would presume that (in general) selecting stuff first in Excel and then deleting them appears to be quicker, but I'm not sure how to pull that off.

View 9 Replies View Related

Deleting Multiple Rows?

Mar 15, 2013

I have a large list of coordinates that I pasted from a website, and in Excel it has an emty row between every coordinate. I have about 2,000 cordinates, so ~4,000 rows. Is there a way to delete every other row besides manually?

View 1 Replies View Related

Deleting Rows Based On Their Value

Jun 26, 2008

I am having trouble with the .SpecialCells(xlCellTypeBlanks)

What I need to do is for a macro to first go through a range ("G8:G50"), Add a 0 value to any blank cell.

Then I want the macro to delete the entire row for any of the cells that have a value of 0 in that range of "G8:G50"

View 9 Replies View Related

Deleting Rows With Macro

Mar 19, 2009

I want to delete every second row, because I have data with 0.25m interval and I want 0.5m interval. Why I try the following it doesn't work?

View 2 Replies View Related

Loop For Deleting Rows

Apr 20, 2009

Loop for Deleting Rows
Whats wrong with my code ?

View 3 Replies View Related

Deleting Rows On Conditions

Apr 24, 2009

I would like to delete rows that are based on these conditions: First ,Do a loop from row 2 to last available row. - Delete rows with same column(column B) that has the same value. However I want the last available row with the same ID to remain.

- Delete Rows with any values in found in other sheet column B. When the value taken from the first sheet(ABC) is compared to the column B in second sheet(DEF), if they are equal, the row will be deleted in the second sheet and the rows in first sheet will main. I had attached an simple example with the 2 sheets. The Result are shown in the example.

View 2 Replies View Related

Deleting Unwanted Rows <10

Aug 24, 2009

I need some VBA to delete rows that are under the value of 10 in column H and keep the rest, is there a way of doing this

View 7 Replies View Related







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