autofilter

  1. MikeMcCollister

    AdvancedFilter in VBA, Help!

    I am trying to do some advanced filtering so that I can sum some columns. My test code does not work. First when I try to set the criteria cell VBA just errors out. If I skip that and try to Call rangeTable.AdvancedFilter it does nothing. Function FilterTest(theMonth As String, category As...
  2. M

    VBA code to auto filter using cell reference

    Hi, I need a VBA code to autofilter list of values reference from a different sheet. The filter condition is such it should contain the values in the referenced cells not equal to the value in the cell The code I have been trying is as below Worksheets("ZBA extract").select...
  3. H

    Autofilter for Top Item

    Hi I know with autofilter it is possible to filter for top or bottom 10, but can't see any way to filter for the best item in a list. I have a sheet with maybe 150k rows and the data is grouped into dates, times and names and many columns with numbers relating to particular information. I'd...
  4. P

    Range.Insert not working when filter is active

    I haven't noticed this issue in regular Excel because I have an active filter, I can still right-click and insert a new table column. However, periodically, when I try to insert a new column in VBA, I run into a run-time 438 error when I have an active filter. Has anyone else experienced this...
  5. A

    macro, filter criteria2 = array for date column

    a macro reads the filtering selected by the user of an excel data file. When the user selects from a date column, using the tree list to select years, I can record a macro that simulates what has been selected as: ActiveSheet.Range("$A$3:$T$179896").AutoFilter Field:=4, Operator:= _...
  6. M

    Simple VBA Amendment

    Hello all, A really simple one for you folk I'm sure. I've got some existing code which I need to adapt ever so slightly. 1) The code currently runs on all sheets except 'Summary', but I need it to run on all sheets except 'Summary' and 'FAQs' 2) The other tabs have an autofilter on row 4...
  7. R

    VBA Autofilter Error Handling

    Hi everyone, I have a part of my code where I delete some rows based on information found with autofilters. On the first filter, when it does not meet the conditions, the code just skips it as it should. On the second filter, the error handling is not working. blankcolumn = Cells(1...
  8. B

    Create Custom Msgbox VBA Multiple Criteria

    Hi Everyone, What if I want multiple msgboxs per each sheet? I realize I can have two different outcomes to a specific scenario. Is there a way to use IF, THEN? For instance, if COLUMN L and COLUMN K equaled ONE then I would want a message to say "Burris article, check sourcing", but if COLUMN...
  9. D

    How to Autofilter on the second row

    I have 3 sheets in my workbook, and my code checks if the Active Cell in Sheet 2 is blank or not, If Len(ActiveCell.Value) = 0 Then MsgBox "Blank Key in:" & ActiveCell.Address, vbCritical Exit Sub End If If it's not blank, then my code counts the number of times the Active Cell in Sheet 2...
  10. J

    Filter a range that the value of my cell number falls into

    Hi, I am working with 2 worksheet in the same workbook. Sheet1 has the values. Sheet 2 has the table of data with header. My goal is to read the values from sheet1 and then filter a specific column with that said value. I can get that far. The issue is my value in sheet1 is not an exact value...
  11. Mister_J

    Macro To Filter Column Based On What I Want To Remain Visible

    I’ve been looking into finding or creating a macro that can filter a column of categories that continuously grows. I always want to filter the same categories but when new ones are added I have to add the new ones to the list to be filtered out. So can I create a macro that will filter...
  12. D

    Inserting a Visible Autofiltered Row into Another Sheet (Excluding Header)

    I am trying to AutoFilter (in column A of SHEET 1) the Active Cell in SHEET 2. Then I have an IF Statement that counts the number of Visible Rows, and if it is more than 1 (to exclude the header) then I would like to insert a new row into SHEET 3 and cut and paste the values of the Auto filtered...
  13. C

    VBA to automatically reapply filter

    I have a table that pulls data from another range based on a dropdown from another worksheet. I have tried VBA's to clear the blank rows based on a cell value and can't seem to get them to work. (I think it's because of the formula in the cells -...
  14. D

    Range.Rows property with autofilter applied

    Hi MrExcel, I need your help. I have an autofilter applied to a range resulting in non-continuous set of rows visible (see snapshot). Assume I want to access the number of the first visible non-header row (which is number 7 in this case). When I run Dim rng As Range Set rng =...
  15. A

    Autofilter for multiple sheets which may/may not have the data

    Hi all Ive been having some errors with this part of my code in bold. as i have this code run for 4 different sheets, each sheet will come back with different data, some sheets even with no data. this code works fine on 1 sheet, and the rest keeps getting stuck at the bolded part even though...
  16. J

    Autofilter / Advanced Filter Copying over all data

    Hi, This is a bit frustrating. I've applied code to filter data using the autoFilter function but when I apply a new line with AdvancedFilter it appears it clears the filtered range and copies over all data With Sheets(1).ListObjects("Table13256").Range.AutoFilter Field:=22, Criteria1:="<>"...
  17. H

    On Error Resume Next - cover all autofilter criteria

    Hi All Just a quick one - can I check the error handler covers all my autofilter criteria? I can't avoid the errors occurring on any of the criteria, I just want to skip over. Sub DataRaw() Sheets("DataInput").Select On Error Resume Next Selection.AutoFilter...
  18. M

    Deleting specific rows with VBA

    Hi Guys I have data in two columns and would like to delete data in the second column which has the letter 'N' in it, using the auto filter. The amount of rows will vary. In the example below, there are only 5 rows and I would like to delete rows 3 and 4, as they're the rows with the letter...
  19. P

    Autofilter

    <code>Hi gang - I need some help.....I'm doing an autofilter and want I want is that if the filter doesn't come up with any results, then I want to unfilter. If it does come up with a result, I want to copy the data in column H onto a different sheet. What currently happens with my below code...
  20. D

    using resize ?

    I have the following code which sets a range based on data being in the last column, however after running the autofilter a few lines later, the rows meeting the criteria have no data in the last column and are not copied to the new sheet. How could i get all the records after the autofilter...

Some videos you may like

This Week's Hot Topics

Top