1. jim may

    Why is this code producing R/T 448 - Argument not found

    Sub foobar() Dim SearchText As String SearchText = "*" & Range("B4").Value & "*" With ActiveSheet .AutoFilter Field:=2, Criteria1:=SearchText End With End Sub
  2. gheyman

    VBA code paste as text not formula problem

    I have code that was running great for more than a year. Now its adding in the formula as text so its not doing the calculation any longer "=IFERROR((INDEX(Detail!C[-2],MATCH(CMOP!RC[-1],Detail!C[-2],0))),""DELETE"")" Any help is appreciated Sub StripDown() ' ' Macro1 Macro ' If...
  3. J


    how can i change the code below to activesheet instead of referencing sheet name so i can use in other sheets and don't have to change sheet name everytime. Sub ApplyFiters_Accrued()With Worksheets("OCT").Range("A3") .AutoFilter Field:=5, Criteria1:="" .AutoFilter Field:=9, Criteria1:="COGS"...
  4. S

    Help to code copy to 02 sheets extend copy to 100 sheets

    Hi all I have code below Code work well If I filter, copy data from 06 sheets to sheet("ky1") with condition in sheet(main).range(G1) and to sheet(ky2) with condition in sheet(main).range(G2). Now I want extend code that: 1. Condition value to filter in range: sheets(main).range(G1:G& lastrow)...
  5. S

    Help to correct code with textbox in form

    Hi all I want to check value in textbox1 in form(CDKT) with sheet("nb","ngb"). If found will copy row to sheet(ky1) and Ihave code below Code yelow at line: Set ans1 = TextBox1.Value And have VBA notice: "Object require" Please help me correct this code, thanks Sub...
  6. C

    VBA - Help!

    Hi, I have the below code which looks for any dates from current year in column B and deletes those rows. Every time I run this code it will be on data from a specific month but could be different years (so always November but could be November 2000 all the way to November 2019). It seems to...
  7. J

    Issue with Duplicate Const & Dim Changed As Range

    Hi, Trying to get these two instances to run together but not sure how to simplify. Can provide any more information if needed. Private Sub Worksheet_Change(ByVal Target As Range) Dim Changed As Range Const YesCol As String = "L" ' Set Changed = Intersect(Target...
  8. T

    Deleting an entire row in VBA Macro

    I've created a filter for an account #, if that account # appears in my data file, I want to delete the entire row. This has worked before, but now I'm getting a debug error lRow = ActiveSheet.Range("A500").End(xlUp).RowIf AutoFilterMode = True And FilterMode = True Then...
  9. N

    Paste range without conditional formatting doesn't work

    I have this code to filter a table and paste the used range to another sheet. However, I only want the values to be pasted and nothing else. My code incorrectly copies the format and conditional formatting. any ideas why ? many thanks! Set lo_b1 = x_bf1.ListObjects("Feed1") s_date =...
  10. T

    VBA - If formula

    Hi, I"m trying to create coding that says, filter column 3 for anything other than N/A's, if Payout is populated, enter Yes in those columns of AA, if Takeover, enter Yes in column AC. I don't have an IF formula either, but that's what I would like. When I enter the code below, it's entering...
  11. A

    Excel Cannot Complete this Task with Available Resources VBA error

    Hi All, I am getting an "Excel Cannot Complete this Task with Available Resources" message when I attempt to run the below macro. The issue only occurs if I paste 1 line of data in the macro workbook If I have more than 1 line, everything runs as I expect. In my code below, is my If...
  12. T

    VBA Filter for $-

    I'm trying to filter, not sure why its not workig, I seem to always have an issue with the does not <>, there's a formula in that cell, but it shouldn't matter I wouldn't think. With ActiveSheet .AutoFilterMode = False With Range("a2:m2" & lRow) .AutoFilter...
  13. M

    Delete rows if they don't contain multiple specific text

    I would like to delete all rows that don't contain multiple specific text in column D. The below code works great for two options but I have a list of twelve words that I would like to add. Thanks in advance
  14. M

    VBA Filter Table based on Cell Value on Another Sheet

    Hi, I've hunted around for code for my problem and thought this would work but doesn't. I have a table where I want to filter 'Country Name' = to 'Country' value listed on another sheet. (Then, copy the data from that table to other cells. - which I think I have worked out) Option Explicit...
  15. DataBlake

    [VBA] Using Ucase & Like With Filters

    Hello all, I'm trying to create a filter so that i can delete anything that contains "Atv", "Utv", "Duallie", and "Dually" Issues arise when those phrases are sometimes capitalized, sometimes capslocked, and sometimes lowercase. This is my first attempt with filters in VBA which does the job...
  16. T

    VBA Excel - If word in this column delete contents from another column

    I'm trying to say; if the word payout is in column c, delete contents from column b. I"m getting an error message @ If (Not Intersect(Target, Rows(3)) Is Payout) And (Target.Count = 3) Then Sub Filter1() Dim lRow As Long Dim ts As Date If AutoFilterMode = True And FilterMode = True Then...
  17. T

    VBA Macro - changing a range of cells in a column from No to Yes

    I'm trying to change the word No to Yes in column M I have headings in row 2, so anything after that to the last cell in column M I want to change to Yes, but I'm getting an error. Sub Filter() Dim lRow As Long Dim fnd As Variant Dim rplc As Variant fnd = "No" rplc = "Yes" If AutoFilterMode =...
  18. T

    VBA filters using 3 or more criteria

    I'm trying to filter using 3 criteria but I'm getting an error, here is the code I tried. With ActiveSheet .AutoFilterMode = False With Range("A2:I2") .AutoFilter .AutoFilter field:=4, Criteria1:="Text56", Operator:=xlAnd, Criteria2:="Text76"...
  19. S

    VBA: Execute code on sheet names with 4 characters

    Any way to get the code to work on sheet names with only 4 characters? Cells.Find(What:="IG").EntireRow.Delete Cells.Find(What:="OG").EntireRow.Delete With ActiveSheet.UsedRange .AutoFilter Field:=13, Operator:=xlFilterNoFill...
  20. S

    Autofilter using reference table

    Hi all, Hopefully someone can put me out of my misery, as I've hit a brick wall with this one! So here's the plan: Sheet1: Contains all the data, pasted in on a monthly basis Sheet2 (Mapping Table): Contains the words which I'll be using in my autofilters In future the names used in the...

Watch MrExcel Video

This Week's Hot Topics

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back