Friday, September 23, 2016

Troubleshoot:Criteria for filtering in a Worksheet Range.

Criteria for filtering in a Worksheet Range.

4th field of the data in "Sheet3" has needs to be filtered for values that are in Sheet2 Range a2:a13
I tried recording a macro and then modifying the criteria as below.
It fails.
Sheets("Sheet3").Range("$A$2:$F$95").AutoFilter Field:=4, Criteria1:=ThisWorkbook.Worksheets("Sheet2").Range("a2:a13")
What is the correct way to do it? (Either Autofilter or Advanced Filter or both.)
Thanks in advance for the help.
Regards,
Raj

Anwsers to the Problem Criteria for filtering in a Worksheet Range.

Download Error Fixer for Free Now

4th field of the data in "Sheet3" has needs to be filtered for values that are in Sheet2 Range a2:a13
I tried recording a macro and then modifying the criteria as below.
It fails.
Sheets("Sheet3").Range("$A$2:$F$95").AutoFilter Field:=4, Criteria1:=ThisWorkbook.Worksheets("Sheet2").Range("a2:a13")
What is the correct way to do it? (Either Autofilter or Advanced Filter or both.)
Thanks in advance for the help.
Public Sub m()
    Dim sh1 As Worksheet
    Dim sh2 As Worksheet
    Dim myArray() As Variant
    Dim lng As Long
   
    With ThisWorkbook
        Set sh1 = .Worksheets("Sheet1")
        Set sh2 = .Worksheets("Sheet2")
    End With
   
    ReDim myArray(0)
   
    For lng = 0 To 11
        myArray(lng) = sh1.Range("A" & lng + 2)
        ReDim Preserve myArray(UBound(myArray) + 1)
    Next
   
    sh2.Range("$A$1:$D$18").AutoFilter _
        Field:=4, _
        Criteria1:=myArray, _
        Operator:=xlFilterValues
       
    Set sh2 = Nothing
    Set sh1 = Nothing
       
End Sub
 
 

Mauro Gamberini - Microsoft© MVP(Excel)
http://www.maurogsc.eu/

Windows Recovery - Totally Fix All Errors including Criteria for filtering in a Worksheet Range.

  • Click on the Start button on the Taskbar.
  • Type "System Restore" (without quotes) in the Search box and hit Enter or,
  • Click on System Restore (when you see System Restore pop up  in the list of search results).
  • Make sure the "Recommended restore" radio button is checked on the restore utility window.
  • Click on Next and follow the instructions given.

Note: There is the option on the restore utility to select "Choose a different restore point". Unless you have a specific reason to select a different date and time than what Windows recommends, just select the recommended option stated in the steps above. If you choose to select another one, follow these steps:

Click on that desired date and time, and Windows 7 will perform a scan for any affected programs in that restore point.

Once completed, click Next and follow the instructions given.

Once you have selected the restore point, your system will start the restoring process, after which you will have to restart the system.

Recommended Method to Repair the Problem: Criteria for filtering in a Worksheet Range.:

How to Fix Criteria for filtering in a Worksheet Range. with SmartPCFixer?

1. Download Error Fixer . Install it on your computer.  Click Scan, and it will perform a scan for your computer. The errors will be shown in the list.

2. After the scan is done, you can see the errors and problems need to be repaired. Click Fix All.

3. When the Fixing part is done, your computer has been speeded up and the errors have been removed


Related: How Can You Update & Download NVidia 6100, 6800 GS/XT Display Driver v.260.89 WHQL,Where to Download NVidia GeForce 8800 GT WHQL-certified driver v.196.21,How to Update & Download NVidia GeForce Go 7400 Display Driver v.260.19.12,[Solved] Download NVidia GeForce GTX 460M Driver v.331.82,Download NVidia Quadro Plex Model IV VGA Driver v.304.43 Certified,Way to Download RealTek RTL8100C(L) Driver v.5.01,Way to Download RealTek RTL8100E Drivers v.694,Way to Update & Download RealTek RTL8101L Auto Installation Program v.6.110 driver,Method to Update & Download RealTek RTL8111G PXE and RPL ROM code v.2.58 driver,How to Update & Download RealTek RTL8411B(N) Driver v.10.003,Best Way to Update & Download ASUS A53SV nVidia Graphics Driver v.8.17.12.6686,Method to Herunterladen ASUS K75VJ Intel Rapid Storage Technology Treiber v.11.6.0.1030,How Can You Update & Download ASUS CG8580 Intel Chipset Driver v.9.3.0.1019,Method to Update & Download ASUS K41VD Intel INF Update Driver v.9.1.1.1015,Way to Update & Download ASUS Pro70T NB Probe v.3.0.0026 driver
Read More: How to Fix - Convert list of numbers to distribution from 0 to 100 with set mean?,Cool Edit: can no longer record Tech Support,Troubleshooting:creating a dynamic range of rows and columns,csrss.exe High Disk Activity,Create a local network with sharing wifi printer and tethering wifi [Anwsered],Closing Internet Explorer causes error,Compare 2 Tables and Calculate the PROFIT Faster,Computer goes to Windows Boot Manager after Start,Connect to one of my network computer remotely when don't allow exception box Marked,computer locking up randomly

No comments:

Post a Comment