Exclude Unwanted Data After Macro Filter

Sep 9, 2006

I have a sheet for addresses (Column 1 = Name, Column 2 = Address line 1, Column 3 = City, Column 4 = Postcode) and I run a macro that Filters that data based on the the city to different Tabs. This works fine except that sometimes, once the data is filtered I will find one or two addresses on my new filtered sheets that I really wanted to exclude. As my main address Tab information changes regularly, Ideally, I would like to see the Item on the City filtersheet, Double click it, and this would have the effect of deleting it from the City filtersheet but also copying it to an "Exclusions" Sheet which I could use before I run my normal filter macro to filter out these bad addresses.

View 9 Replies


Filter Then Delete Unwanted Rows

Oct 8, 2007

I am using the following code to filter for data I do not want and then to delete those rows and show remaining data. It works fine except when the filter comes up empty and there is no unwanted data to delete.how to improve this code to accomodate this situation?

Selection.AutoFilter Field:=4, Criteria1:=">" & dweekend, Operator:=xlAnd
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Thank you for reading

View 9 Replies View Related

AutoFilter VBA - Filter And Delete Unwanted Rows

Oct 25, 2012

I'm trying to filter and delete unwanted rows as I need row where dates is within a specified range.

How can I do this using AutoFilter? or are there any other alternatives?

View 2 Replies View Related

Excel 2010 :: Filter To Select Records - Removing Unwanted Blank Cells

Jul 25, 2013

I have a spreadsheet which is used by users unfamiliar with Excel. They are using the filter to select records, however when this is used some records appear which have no entry in the cells of that column. Can I overcome this? There is no data in the blank cells, other than a data validation drop down.

View 1 Replies View Related

Delete Visible Rows After Auto-Filter & Exclude Headings

Sep 5, 2006

I am asking if it is possible to delete filtered rows? With code.
What I mean is after setting a filter, then deleting all shown rows except row 1, (Titles)
I did a search but nobody seams to have asked this yet, so recorded it, but that did not seam to enlighten me much either.
Or is this the wrong approach, should I delete using a loop, using the filtered criteria as to say delete row, or move on to the next row?, this would be far more time consuming as when all can be deleted at once if possible of corse.

View 4 Replies View Related

Advanced Filter: Exclude Blank/Empty Cells Criteria

Sep 11, 2006

Im using an advanced filter that uses the following criteria
Days Late Note(s) Note(s)
>90 <>*agreement* <>*QTR*

This shows all data over 90 that do not incl the words agreement or QTR in a column marked Note(s).

My problem is that I do not want to show records that are Null in the Note(s) column.

<> Does not work (possibly because it is text and not Numbers)

as this does work if used on records that contain numbers.

View 9 Replies View Related

Unwanted Statements In Macro..

Nov 28, 2009

I created the driver macro Mike2 (At first cosisting only of the first 2 lines) with keyboard shortkey +m, to run macro Mike. (In future additionals macros). Every time I run this macro it adds 2 lines to the Macro ,regardless of the End and Exit sub statements. Why?? Do not want this to happen.

View 4 Replies View Related

Unwanted Highlighting When Running Macro

Jan 18, 2013

I am using macros for the first time in Excel. I have a sheet that pulls from attached sheets using VLOOKUP and I added a simple worksheet change macro to auto resize the height of cells to match the information being pulled via VLOOKUP:

Private Sub Worksheet_Change(ByVal Target As Range)
End Sub

My problem is that when the cells autofit it highlights the rows and some of the highlighting won't go away until the screen is scrolled. This is not much of a problem for me, but I do not want it to be an inconvenience to the other people who will be using this. Is there anyway to get rid of this highlighting or at least make it so that it behaves normally and all cells will unhighlight when a new cell is selected? I'm attaching a copy of the work in progress.

Matrix Checklist.xlsm

View 2 Replies View Related

Looping Macro Generating Unwanted Results.

Jan 27, 2009

I have a spreadsheet with multiple departments on it set out in no particular order, (just as they are added) and this sheet needs to stay like that as a record of when added.

The problem I am having is that I need to generate a bordered blank Weekly, Monthly or 52 week planner for what ever department needs it on a different sheet so it may be printed. This will contain that departments items but leave the days/weeks blank for them to fill out.

As an example I use the code below to loop through the original sheet and generate a 52 Week Planner if the criteia matches.

View 3 Replies View Related

Macro Calls A Unwanted Procedure During Runtime

Jan 14, 2010

I have a VBA application in Excel.
In a certain time, when the code is executed in the

Private Sub CB_ValidaHoras_Click()

View 11 Replies View Related

Getting Rid Of Unwanted Data

Feb 10, 2009

Each week I import some data into my workbook (its financial-imports stock names, identiy codes and stock type). I've added a formula which calculates the credit ratings of each stock type, and then conditional formatting to highlight any credit ratings which are less than my required rating.

Further to this I need to get rid off all the rows which which have an stock type "No Asset Class". I cant use auto-filter because there are too many other stock types which I need to be included.

View 2 Replies View Related

Filtering Out Unwanted Data

Jul 25, 2014

I am working in a worksheet with 15k rows of data. I have sorted and added subtotals. Is there a way to remove data based on number of occurrences? Example, if the same account number is listed less than times in the worksheet, i would like to eliminate the account number from the data. How can i achieve this?

View 1 Replies View Related

How To Highlight Unwanted Data

Jan 28, 2014

I want codes to highlight unwanted data.

EX- B column should be CAPS, C=D, F & H & J column should not be blank

if data found other than this please highlight the data by any color.

View 1 Replies View Related

VBA Code To Extract Data And Remove Unwanted Data In Row

Dec 15, 2013

I have a workbook that has ben imported into excel and I need to extract the Cabinet sizes (red text) from ColumnC On Sheet2 leaving out the rest of the info. I have a button on the home sheet that has the code that I am running to generate this report it will do most of what I want but I am stuck at extracting the cabinet sizes.

The data is coming from the SheetComponetListing worksheet and going to Sheet2. I have manually created the end result that I am looking for on the CabinetSize worksheet. [URL]....

View 3 Replies View Related

Removing Unwanted Data From Worksheet

Mar 22, 2013

I have a data sheet which I need to filter in some way with multiple criteria. For example

I have a sheet called Training which has 4000 rows of data. Column F is labelled Cost ID and under this column I have 400 different IDs of which I need to see data for 155 out of the 400.

Is there a simple way of removing the unwanted data?

View 5 Replies View Related

Deleting Rows With Unwanted Data?

Dec 6, 2013

What I need to do is under Document Number (column D) is to delete the rows that do not start with "RM", "AG" or "MA"and then move the rows up.

View 2 Replies View Related

Macro To Exclude 1 Sheet In WKB

Jun 17, 2008

I have a macro code (attached below) which i am using to do some conditional formatting for all my worksheets in a workbook. I would like this macro to skip 1st 2 sheets in this workbook.

Can some1 kindly edit my following code so that macro does not runs on 1st 2 sheets namely "Sheet1" & "Sheet2" and continue running for all remaining.

View 14 Replies View Related

Ask Macro To Exclude Sheet By Name?

Jan 13, 2009

I have a workbook event where the macro inserts the username and date into the comments of the cell that has been edited.. However I would like it to exclude the 'Index' worksheet that has its own macro for indexing all the sheets in the workbook. As every time the sheet is clicked and the macro updates the sheet names all the cells comment.

View 2 Replies View Related

Macro To Filter Out Data For Five Regions

Jun 24, 2006

I've a workbook in which I run an excel macro to filter out data for five regions W1, W2, W3, W4, W5, the macro creates five sheets (w1, w2, w3, w4, w5) and places them in the same workbook along with the original master sheet called "west".

The data in all the sheets is layed out in an identical fashion except that the the number of rows in each sheet will differ depending on the number of records for each region in the master sheet "west".

I was looking for some vba coding to automatically add sum totals in two columns (I & J) for all the five region worksheets.

The first record always begins from row 4, in all the sheets.

so as an example W1 sheet could have a sum formula in I20 = Sum (I4:I8)
and in COl J as Sum(J4:J18). Row 19 is a blank row, and the intention is to leave a blank row just before placing the sum total in all the sheets.

W2 will have the same starting range but might differ in how many rows to sum .

And so on for the 4 remaining region worksheets in the workbook.

View 9 Replies View Related

Filter Data Macro Code

Mar 30, 2008

I do not know VB coding but is in need of help on data filtering/matching. I have 2 very big excel workbooks with a few thousand lines and am trying to do some filtering/matching. Example below.

The two workbooks I have contains same data in column A and also column D from the first data set is the same as column B in the 2nd data set. I am trying to add column C and D from the 2nd data set to the 1st data set and need to make sure they match up to column D from 1st set and B from 2nd set. It is quite strenuous to do this manually,

A1 2 3 100A
A1 2 3 100B
A1 2 3 100C
A1 2 3 100D

A1 100A AA BA
A1 100B AB BB
A1 100C AC BC
A1 100D AD BD

View 3 Replies View Related

Autofilter To Delete Chunks On Unwanted Data

Feb 13, 2009

I am using an autofilter to delete chunks on unwanted data, by using Range(Selection, Selection.End(xlUp)).Select however it picks up the header row. Is there anyway I can either get the selection of data to select one less line, or a way to get it to leave the header line?

View 2 Replies View Related

Clean Data - Removing Unwanted Characters

Feb 25, 2007

I have an excel sheet with approx 30,000 rows of data.

These are all keyword phrases.

They can be related to any subject, but for this example these are related to the root keyword phrase of "car Rent"

I have some software which basically pulls in keyword phrases from search engines and meta tags etc, including misspelled keyword phrases.

My problem;

The data is uncleaned.

In other words there might be I think it's called "Carriage return" data in there, so the row of data might be very deep (Instead of a row height of say 10.5 it could be anything, IE some could be 100 or 200 even).

There are unwanted characters, for example; ()[]{}+?!""^*

(If it could delete all unwanted characters except for letters/digits)
There is a problem I see, that if it removes _ or - between words, that it will join the words together which won't be of any use. If it deletes anything with a letter either side of it or a letter and digit, or 2 digits, 1 either side it would then need to add a space to replace the hyphen.

So for example; if there was a phrase in the list like ....

View 9 Replies View Related

Excel 2010 :: Macro With Autofilter With Array To Remove Unwanted Criteria With Wildcard

Apr 28, 2014

I'm having a hard time making this maro work in Excel 2010.

I need it to filter out the items "AR", "BATCH", and the line of "Total:*" where the * is a total amount of any given number dependant on the day.

Below is the coding I have that Excel is not liking.

Sub FilterAccurateRawData()
' FilterAccurateRawData Macro
ActiveSheet.Range("$A$1:$AA$45415").AutoFilter Field:=1, Criteria1:=Array("<>AR", "<>BATCH", "<>Total:*")
End Sub

View 3 Replies View Related

Creating Macro To Filter And Copy Data

Jun 19, 2014

I have a spreadsheet. This has columns begining with A to S (with data in it)

It has rows beginning on row 5 and goes down to 85 but it gets bigger every day.

I want to create a macro with several phases

Phase 1 - Select the rows I specify, ie pop up box to decide on the rows
Phase 2 - Filter down and select the rows in this selection where column K has a value (unselecting the rest)
Phase 3 - Copying Columns A, B, D, E, F, K, from the selection
Phase 4 - Pasting these columns into A, B, C, D, E, F, of the sheet the macro sits on....

View 14 Replies View Related

Using Macro To Operate Filter On Variable Data?

Feb 28, 2014

I have a written a macro to populate a filter criteria with a comma separated list, but the filter fails to work as each individual item on the list needs to be surrounded by speech marks (") and I don't know how to do this.

This may not be an actual vba issue?

The list I am using is derived from =SUBSTITUTE(TRIM(BK9&" "&BK15&" "&BK21)," ",",") There are 120 different cells that this formula references that could be blank. The SUBSTITUTE TRIM functions allow me to just use the cells that have data in. But I can't seem to get the " symbols in there. (I've tried the TEXT function on the original cells, & this doesn't work.

View 3 Replies View Related

AdvancedFilter (macro To Filter Some Data From One Sheet To Another)

Jul 8, 2009

I'm having with creating a macro to filter some data from one sheet to another. I used the "record a macro" function to get the code I've posted below but part of the code is always changing.

In my workbook I have a main sheet called "Data" and another sheet called "Parts". The code below does what I need it to do, but the problem is that the cell range (A2:I139) is not constant and may change depending on how many rows of information I import on the "Data" sheet.

What I'd like to have happen is either have a dialog box pop up and prompt me to select the cell range (I've tried using the Application.InputBox function but can't figure it out), or since the first cell will always be A2 and the last column will always be I, have excel automatically figure out the last row that contains data.

View 2 Replies View Related

Macro Filter Data & Copy To New Workbook

Aug 16, 2008

I would like to use a dropdown box for all the names in my worksheet. Once a name is selected have all the rows filtered on that name and copied to a new workbook.

I think I'm making this harder then it is, but I'm just not comprehending what needs to be done.

View 9 Replies View Related

Created Chart Grabbing Unwanted Data Series (VBA)

Sep 20, 2013

My code inserts charts and then assigns them data series. The problem is that sometimes it likes to grab 5 or 6 extra sets of data series and throw them in there too. I've done some research and it seems that Excel likes to guess what data is going in to a chart when you first add it in and grab some of that, rather than just waiting for me to assign it the data. The sheet I'm doing this on has multiple sets of similar data along row 1, the code crawls row 1 and creates a new chart for each set of station data it finds.

Sub Make_Chart()
'create bar chart
Set chrt = ws.Shapes.AddChart.Chart

'add and format chart

[Code] ........

Example data set below. RefCell is set to the top left cell (4.02), n is the length of the raw data in rows.



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

View 3 Replies View Related

Macro Sort A-Z, Exclude Some Text So It's Not Sorted

Jan 12, 2010

I've setup a macro button to sort some stockpile items from A-Z so entering quantity on hand can be done more easily. Each cell is a drop-down selection so at various times, there can be different stockpile items in the list, thus why, I setup a macro to quickly sort the list.

However, I've got some text (Select Stockpile Item) that I wish not to be included in the A-Z sort as this might put items starting with T or later at the end of the sort.

Sub SortMySpecialStockpileA2Z()
If MsgBox("Are you sure?", vbYesNo + vbQuestion) = vbNo Then
Exit Sub
ActiveWorkbook.Worksheets("MyStockpile").Sort.SortFields.Add Key:=Range("K4") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("MyStockpile").Sort
.SetRange Range("K4:L110")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
End With
End If
End Sub

View 9 Replies View Related

Trying To Build A Macro Filter Based On Data In Either Of Two Columns

Jul 31, 2008

I created a contact list that incorporates buttons at the top of the page to sort the data based on two customer type columns (thanks to Richard for help getting this far!).

I am attaching the file so that it will be easier to take a look. Four of the five macros are working fine but the second one ("All Clients") filters on the premise that "yes" is answered in either of the two customer type columns. In other words I am trying to show the records that have "yes" entered in either of these two columns, not necessarily both columns.

View 9 Replies View Related

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