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


Excel 2010 :: Copy Table (listobject) INCLUDING Hidden / Filtered Rows

Nov 11, 2012

I'm trying to copy a whole bunch of tables with identical layout to a master table, so I can create a whole bunch of pivot tables that include data from ALL the various tables. The source tables MAY be filtered, and I can't work out how to copy them easily while also INCLUDING any hidden/filtered rows while at the same time leaving any filter settings on the source tables intact.

If I use something like range("Table1").Listobject.DataBodyRange.Copy then it only copies the VISIBLE rows.

But I want ALL rows to be copied to a master table.

1. I don't want to unfilter the sources tables, because users might still want the source tables to remain exactly as the user filtered them. (However, it doesn't matter if the DESTINATION list is filtered or not). I realise that I could copy the entire sheet to a temp sheet, then unfilter any tables on that sheet and THEN copy these to the master list. But wan't to know if there's a simpler way.

2. I DON'T want to use SQL to create a pivot table directly from the tables, because the tables will have further information added to them from time to time, and so if I use SQL to make a pivot directly from them, I'll have to recreate the pivot cache using that SQL query each time, which might muck up the settings in any existing pivot tables. I realise that I could use SQL to copy the data to a 'staging area', and just point the pivot table at that.

3. I can't use PowerPivot, because its not installed in this environment.

View 1 Replies View Related

Macro To Filter And Delete Row Not Deleting Visible Filtered Rows

Jun 6, 2013

I'm working through a filter macro to delete unecessary rows of data from my dataset.

- I have a Dynamic Range for my dataset called "CanadaData"
- I'm trying to delete rows from the 5th column of my dataset for cells containing "DIRECTSHIP"

The macro filters the range fine, but when if comes to deleting the row, the macro stops.

Sub CanadaWarehouseFilter()
x = Range("E" & Rows.Count).End(xlUp).Row
If Application.WorksheetFunction.CountIf(Range("E22:E" & x), "DIRECTSHIP") > 0 Then

With Range("CanadaData")

[Code] ......

View 2 Replies View Related

Excel 2010 :: Can't Delete Filtered / Visible List Rows From List Object

May 19, 2014

I have pulled a SharePoint list into my workbook. The list object (table) is still linked to the SharePoint list, as I'd like to synchronize it later on. I have filtered it with an autofilter. I'd like to delete all of the visible rows. I have tried a billion things to no avail. I have been searching Google for hours now. None of the examples work.

View 5 Replies View Related

Excel 2010 :: Range That Ignores Hidden Rows?

Oct 16, 2013

range formula that i am using for drop-down lists. One of the drop down lists is based on the range where the data changes(it is a list of jobs that has been released from cad room and when they have been machined a "yes" in one of column appears and then it needs to be filtered so that only non-machined jobs are visible).

Bitmap Part Description

Expected Spindle Hours
Clock In


I need a formula that is not taking into account values from hiden rows. OR the formula that is not taking into account values from the rows that have Yes in the 4th column.

View 4 Replies View Related

Excel 2010 :: How To Stop Macro From Sorting Hidden Rows

Feb 3, 2014

I recorded a simple Macro in Excel 2010 to sort data by the first Column, heading "Ref". I have assigned CTRL + e as the keyboard shortcut for this.

My sheet contains a number of hidden rows (as I hide rows when I have finished working on that issue).

When I run the macro, it does sort by the number of Column A, but also, the hidden rows are then shown again.

I realise I could just click on the A-Z sort button to stop this happening, but I really like being able to use keyboard shortcuts, which is why I tried the macro route.

I wondered if it is possible for the macro to ignore hidden rows?

This is the macro:
Sub SortByRef()
' SortByRef Macro
' Keyboard Shortcut: Ctrl+Shift+E


View 1 Replies View Related

Excel 2010 :: Deleting Rows Based On Cell Value

May 21, 2012

I'm trying to delete a range of rows based on the value of a given cell. For example, if cell AC1 shows 5000, then I'd like to delete (not just clear) the range A5000:AA1048576. Or, if cell AC1 shows 10000, then I'd like to delete range A10000:AA1048576. I've come up with what is below but I don't think this is the right way to do it. I am using Excel 2010.

ActiveCell.FormulaR1C1 = "=COUNT(C[-27])+2"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A" & Range("AC1").Value:"AA1048576").Select

View 5 Replies View Related

Deleting Rows In Filtered Set With For Each?

Apr 8, 2013

I am working on solving a problem where I get every other row deleted instead of every row. The situation is that I am using Autofilter to find empty cells in a column that shouldn't have empty cells. Before I can delete them, I need to add them to an array for exceptions handling. This means I need to step through the filtered range and record each unique ID for followup, then delete them. If I delete as I go, the "For Each" doesn't work on the original rows, but works on an increment. This means a deleted row causes the range to shift up one, and I end up deleting every other row.

I know I can solve this by deleting separately from recording them, but am searching for a way to work with the "For Each" maybe using a "Step -1" or something similar.

View 9 Replies View Related

Offset Formula Ignore Filtered / Hidden Rows?

Jun 16, 2014

I have a name which uses the formula


That populates a dropdown

However I want to exclude hidden / filtered rows?

Iv'e tried sumtotal etc but didnt get any results. I'm after using the rows as options.

View 1 Replies View Related

Deleting Hidden Rows

May 6, 2006

Why do I get a "sub or function not defined" error on the first line? The problem seemed to arise out of nowhere. The sub is located in module 1. I call it with "Call DeleteHiddenRows" in sheet1 inside of a "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" event. Should I be adding some declaration somewhere (some "dim" line?)???

Sub DeleteHiddenRows()
For j = ActiveCell.SpecialCells(xlLastCell).Row To 1 Step -1
If Rows(j).Hidden Then
Rows(j).Hidden = False
End If
Next j
End Sub

View 4 Replies View Related

Filtered Rows Not Deleting As Coded

Mar 1, 2012

I have discovered that my blue highlighted code posted below isn't deleting the visible rows of filtered data as expected.

With core_data
Dim rngToDelete2 As Range
llastrow = 0
lmergedelete = 0
llastrow = .Range("a65536").End(xlUp).Row 'calculate the last row visible
'filter the visible rows to include only those rows in which dupphase3 = "DUP" (ie. duplicated rows)

[Code] ....

Additionally, and I'm not sure if it's related to this, but I am receiving an error with the red line .... "Application-defined or object defined error".

View 6 Replies View Related

Excel 2010 :: VBA To Delete Rows?

Aug 5, 2013

I have some code that worked perfectly in Excel 2007 but crashes Excel 2010.

The part of the code that appears to be the problem is this:

For i = LR To 2 Step -1
If Cells(i, 15) = "Delete" Then Rows(i & ":" & i).EntireRow.Delete
Next i

For info., both screen updating and calculation are already both set to manual.

View 9 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
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

Excel 2010 :: Unable To Delete Rows

May 30, 2014

I'm on mac Excel 2010 and i'm trying to delete rows..but for some reason they don't go! My workbook is a basic one, just filled with a bunch of formulas, i can't understand why it wont let me delete it.

When i do try to delete it, nothing comes happens and when i try to delete a large amount it comes up with 'not enough memory, continue without undo deleting rows' but my laptop has 8GB and my other laptop has 16GB so i can't see why a 16GB laptop wouldn't be able to delete it.

View 1 Replies View Related

Deleting Hidden Rows Based On Results Of Autofilter

May 23, 2007

I am performing an autofilter within a spreadsheet to display only those lines where a name exists in column A. Then I delete all hidden rows. I am having a problem when the autofilter results in no rows being visible. Here is the code I am using for the delete hidden rows:

On Error Resume Next ' In case there's no hidden cells

With Cells
Set rngHidden = .SpecialCells(xlCellTypeVisible)
.EntireRow.Hidden = False 'Unhide all cells
rngHidden.EntireRow.Hidden = True 'Hide previously visible cells
.SpecialCells(xlCellTypeVisible).EntireRow.Delete 'Delete previously hidden cells
rngHidden.EntireRow.Hidden = False ' Unhide previously visible cells
End With
End Sub

View 9 Replies View Related

Excel 2010 :: How To Delete Rows Based On Cell Value

Sep 23, 2011

I have a massive spreadsheet (ca.110 000 rows [excel 2010). I need to cut this monster by deleting all the cells that do not have a certain cell value within them.

Say that in my column A there are different entries (text type). I would like to delete the ones that do not match the following criteria:

"mytextascriteria*", where * somehow stands for the rest of the string.

Strictly speaking I can only determine beggining of the string I want to perserve but the values at the end of that string are changing.

I found the thread about deleting entire row based on a cell value here:
Delete entire row based on one cell?

but I couldn't quite work out how to apply it in my scenario....

Otherwise is completely pointless to do it manualy with these amout of records.

View 5 Replies View Related

Excel 2010 :: Delete Duplicate Rows Based On Values Of Cells

Jun 17, 2014

I'm new to VBA and macros, using Excel 2010, and am trying to figure out how to delete all duplicate rows in a sheet where 2 or less of their values in column A is "1". I'd like have a script that is flexible enough to change to 3 or less if need be. I also have a header row that needs to be offset in the process.

0--123 <-delete
0--123 <-delete
0--123 <-delete
1--123 <-delete based on this the value of column A
0--123 <-delete
0--123 <-delete


0--123 <-delete
0--123 <-delete
1--123 <-delete
1--123 <-delete based on this the value of column A
0--123 <-delete
0--123 <-delete

View 5 Replies View Related

VBA To Delete Filtered Rows

Apr 14, 2012

I have recorded a macro which deletes the visible rows after an auto filter is run - ( auto filter is for custom and blanks).

I thought this was working, but when i look at the code, it looks as if the rows to delete have been hard coded in, and not adapting to just delete the filtered ones.

View 8 Replies View Related

Delete Filtered Rows - VBA?

Aug 19, 2013

So I have the following code:

'Remove UPC sales below $5000
ActiveCell.FormulaR1C1 = "=SUMIF(C[-3],RC[-3],C[-2])"


View 2 Replies View Related

Excel 2010 :: VBA Code To Search Multiple Columns And Delete Any Duplicate Cells (not Rows)

Jun 12, 2014

My Excel program (Excel 2010) currently has several columns and each column looks for and pulls data from a specific file on my computer. Then I need to delete any duplicate data entries, count the number of unique entries and track the changes through a chart. I have everything done except I cannot figure out (or find on the internet) a way to search in multiple columns (more than 2) and delete just the duplicate cells. I want to delete the cells in a way where there is one left. For example if the code 12gf is duplicated three time, I want to be left with one 12gf (it doesnt matter what column the original one is left in). Additionally, column length changes and they are not sorted. I have attempted to attach an image of an example file below.

View 14 Replies View Related

Delete Rows From Filtered List?

May 11, 2012

I can see that I'm not allowed to delete rows from a list when it's filtered. Do I have any options to avoid this restriction?

View 2 Replies View Related

Delete Filtered Rows Returning?

May 6, 2014

What is required to delete the visible rows post filtering?

ActiveSheet.ListObjects("Table24").Range.AutoFilter Field:=9, Criteria1:= _
'insert code to delete visible rows
ActiveSheet.AutoFilter.Range.Offset(4).SpecialCells(xlCellTypeVisible).Cells(1, 2).Select
ActiveSheet.AutoFilterMode = False
Selection.Delete Shift:=xlUp 'this is where the error is occuring.
End Sub

View 3 Replies View Related

How To Delete Visible Rows In A Filtered List

Jan 30, 2013

how to delete only visible rows in a filtered list?

View 9 Replies View Related

Large Tab File Delete Filtered Rows

Apr 1, 2009

I have a large *.tab file with around 450,000 records. I opened the file in excel and then filtered two columns where there are values equal to 0.

I then highlight all the rows and try to delete them, but I receive the following error popup box:

"Microsoft Excel cannot create or use the data range reference because it is too complex."

How can I delete all these filtered = 0 rows without getting this error??

View 9 Replies View Related

Delete All Rows Hidden By Autofilter

Oct 3, 2007

I'm wondering if anyone has a answer to the problem of deleting all the rows that are hidden by an autofilter. We currently have a spreadsheet used within the office that catalogues all applications received, and we want to select all the applications that are relevant to a certain month with the autofilter and use a macro to delete those that are irrelevant, before emailing the spreadsheet to a client. Manually deleting all irrelevant rows would be time-consuming.

The current code I have is:

With Worksheets("Sheet1")
If .AutoFilterMode Then
With .AutoFilter.Filters(1)
If .On Then
Else: Rows.Delete
End If
End With
End If
End With

The theory is that the code first selects the relevant worksheet, determines whether autofilters are on, selects data that is being covered by the autofilter, indentifies those that is being displayed and does nothing, and identifies those which are not displayed and deletes them - in theory!

View 7 Replies View Related

Delete Visible Rows From Filtered Range As Table

Dec 11, 2012

I have a range that has been formatted as a table. Once I've applied a filter, if I try to select all of the rows, and delete the visible rows the option is greyed out.

Is there no way, short of vba, that I can just simply delete the visible rows?

View 1 Replies View Related

Excel 2010 :: Extend Rows Based On The Number Of Rows In Another Sheet

Jun 16, 2014

calculate the number of full rows in one data base located on one sheet X to determine how many rows the macro needs to extend on sheet B (sheet B is made only of formulas for data interpretation in sheet A.

View 14 Replies View Related

Delete Rows Without Deleting Validation?

Jan 7, 2014

I have a long spreadsheet with multiple dependent lists. If a change is made to the spreadsheet such as deleting a row, the validation is removed. I have to re-do the validation each time I make a change. Is there a way to "lock" the validation so that whatever changes are made to the spreadsheet, the validation stays?

View 2 Replies View Related

Delete Picture When Deleting Rows

Feb 24, 2008

I have made an excel document that I use as a order form. I have size columns; qty columns; style number columns etc. After I enter in qtys to a sheet I than sort the sheet by the qty column which than brings all of my ordered styles to the top of the order form. I than delete everything that is below the last column that has qtys in it.

I have added pictures on the side of the worksheet which fit into the grids of each row that corridinates with the appropriate style number. I can sort the worksheet and all of the pictures stay in the appropriate columns; so far so good.

The problem that I run into is now when I go to delete all of the other columns that the customer didnt order none of the pictures delete. They jsut pile on top of each other and I cant figure out how to embed each picture to the appropriate row so that when I delete the row the picture deletes as well. At this point I have to go through and delete picture by picture and there are way to many pictures to do this.

How do I imbed the pictures into the row so that when i delete the row the picture deletes as well

View 9 Replies View Related

Macro Script To Delete All Rows Hidden Using Conditional Formatting Color

Oct 6, 2011

After red filling certain cells based on some conditional formatting, I apply a filter to hide them. Now I need to delete them using a macro script.

View 9 Replies View Related

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