Forum Discussion

abhinavj's avatar
abhinavj
Copper Contributor
Jun 07, 2020

VBA - Filter data in 2 sheets and copy to single 3rd sheet

I have a need to filter data in 2 sheets and copy to 3rd sheet.

Please refer to attached file.

Filter data in Sheet Apr on Payment = Cash

Filter data in Sheet May on Payment = Cash

Copy filtered data to Sheet Consolidated (filtered data from Sheet Apr followed by filtered data from Sheet May)

3 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    abhinavj Why not collect all data in one table? Add a column with the date/month and filter on the payment type of your desire.

    • abhinavj's avatar
      abhinavj
      Copper Contributor

      Riny_van_Eekelen - thank you for your response.

      The issue is that the data gets pulled from a legacy tool in this format in separate sheets

      Also, this is just dummy data to explain the requirement, the actual data is quite different with several columns 🙂

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        abhinavj What stops you from putting them together? Otherwise, have a look have at PowerQuery. It can do these sort of things without much trouble. Have only recently started using it myself, as I only used to work on Excel for Mac for years. The attached file contains a simple example that took less then 5 minutes to create. Others out here can probably help you creating a very flexible solution, better than I can.

Resources