Results 1 to 2 of 2

Filter sheet then assign values into array based on this filtered sheet

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Filter sheet then assign values into array based on this filtered sheet

    Hi.......see enclosed file....I am filtering the "raw_data" sheet......then i try to assign cols A through D to an array.......but i only want the filtered data in the array. Doesnt seem to work.

    can anyone help? portion of the code is shown below..........to see ALL the code look at the file.



    Sub test1()
    
    Dim fl_name As String
    Dim doc_array As Variant
    Dim dtl_array As Variant
    Dim lcdm_array As Variant
    Dim all_unique_array As Variant
    
    
    fl_name = ThisWorkbook.Name
    
    Set ws = Workbooks(fl_name).Worksheets("raw_data")
    
    rows_doc = 77
    rows_dtl = 77
    rows_lcdm = 77
    
    
    
    ws.Range("$A$1:$Q$77").AutoFilter Field:=6, Criteria1:="<>"
    
    ws.Range("$A$1:$Q$77").AutoFilter Field:=4, Criteria1:="ManagerZ"
        
    doc_array = ws.Range("A1:D77").Value
    
    Call turn_off_filtering(fl_name, "raw_data")
    
    ws.Range("Z1").Value = doc_array
    
    end_now:
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1