+ Reply to Thread
Results 1 to 10 of 10

Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    I have been trying to replace a group of macros in a workbook here because they are slow due to the shear volume of data. I posted an earlier attempt which filtered the data twice but because if read the filtered ranges cell by cell into a holding array it was too slow.
    I have my two arrays "Var" and "vaData" but cant think of a course to take from here. Any pointers or suggested methods appreciated

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by nigelog; 01-31-2019 at 01:00 PM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,788

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    Hi Fluff
    the intermediate window was giving an array of 17,000 to 1 when it should have have been 30 entries so I thought was not reading vadata array.

    Made this change to check and no it copies without filtering
    Please Login or Register  to view this content.

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    is this declaring a item as empty??
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,788

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    It's filtering for me, the temp sheet has 5371 rows rather than 17139.

    And yes the item is being set to empty (or "") as it's not needed.

  6. #6
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    Apologies, you are quite correct. The filtering is just the reverse of what I had in mind therefore I never spotted it.

    I changed to
    Please Login or Register  to view this content.
    and I appear to be sorted. Many thanks Fluff

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    Ah. My change is not correct. It does give me the entries for the 3rd item in vaData but only that. I will reverse change and see what I can do.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,788

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    The change you made should show only those customers that appear in the vaData.
    Is that what you want?

  9. #9
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    It is but when I run that the first entries I get are Advanced etc, it has excluded the first customer Abbeyross.
    The only entries that should appear on Sheet "Temp" are the entries on "GeneralReport" who's names appear on the list vaData. All other customer names deleted

    That is exactly what is needed but it is starting from the 3rd item in vadata instead of the first

    Sorted. My fault again. Thankyou Fluff
    Last edited by nigelog; 01-31-2019 at 01:00 PM.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,788

    Re: Filter Array 1 with Array 2 as criteria, returning filtered data to source sheet

    Glad you got it sorted & thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 02-22-2018, 01:47 AM
  2. [SOLVED] match() an array filtered based on criteria in another column
    By simarui in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-11-2014, 03:32 PM
  3. Replies: 4
    Last Post: 12-23-2013, 08:43 AM
  4. Replies: 19
    Last Post: 05-09-2012, 03:31 AM
  5. Filter sheet then assign values into array based on this filtered sheet
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2011, 10:32 AM
  6. Returning Data from an array only if it meets certain criteria
    By Jantzev in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-02-2008, 07:57 PM

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