Visual Basic for Applications (VBA)
AutoFilter Reference criteria
I have looked at similiar possible solutions with no results. Can someone assist me?The code that I'm using works up to the criteria section, I need the code "Criteria1" to reference from another worksheet "Sheet1".On Error Resume Next With Sheet1 .AutoFilterMode = False .Range ("A1:B1"0.AutoFilter .Range ("A1").AutoFilter Field:=1, Criterial:="XXX" End WithOn Error Goto 0The only problem is "XXX" I wish for this data to selected from another worksheet.Using cell "Sheet2!C6".
Declare a variable and set it's value to that of cell C6 from sheet 2. Then set your Criteria1 to the variable... Dim n As String n = Sheet2.Range("C6").Value On Error Resume Next With Sheet1 .AutoFilterMode = False .Range("A1:B1").AutoFilter .Range("A1").AutoFilter Field:=1, Criteria1:=n End With On Error GoTo 0"The new phonebooks are here!"
VBA6 trouble in WINDOWS 10
VBA dynamic formula reference
Sorting and selecting cells based off name.
How to tune auto filter option for our need???
VBA Loggin into secure websites
MS Project import of custom field data from Excel resulting in Run-time error 462
How to write a filtered data as a text file using macros???
Block specific site and show custom content?
Need Urgent Help, Plzzzzzz what code add in vba to display a html web link, it should be display in outlook body. not a link should be display as we open in explorer
Activate PowerPoint and add slide Vba
Any way to use an Access application in batch mode (no UI)?
VBA Code for below requirement...
Help with exporting Content From Outlook 2010 Emails To Excel Spreadsheet
writing sql in Excel
how to make column width proper.