Sum the data after filtering

  • Hi,
    I have 2 columns (A,B) in a sheet1. I am filtering data on Column A and I can see 2 values (AA,CC).
    When I filter data on column A for AA, sum is coming as 32 (Which is display on cell T1)
    When I filter the data on Column A for BB, sum is coming as 0 , But the same 32 is displaying in Cell T1.
    Again, when I filter data on column A for CC, sum is coming as 88 (Which is display on cell T1 and is correct)
    Finally, When I filter the data on Column A for DD, sum is coming as 0 , But the same 88 is displaying in Cell T1.


    Data for BB, DD is available in few times only.


    Please let me know how I can get the SUM as "0" when I filter data for BB and DD.


    I am looking for VBA code for the below scenario.


    Thanks in advance.


    Regards,
    Sri

  • Re: Sum the data after filtering


    Please try and post the sample excel sheet for the ones who are willing to help. People do not want to spend time to create an excel sheet for someone else's work.. Hope you understand where I'm coming from !

  • Re: Sum the data after filtering


    Hard to say without seeing your data, but it sounds like you need to use Subtotal function... with function number 109... see attached. Using function number 109 with Subtotal will only SUM visible (filtered) rows, ignores all other rows. If that doesnt help... post a sample workbook.


    https://support.office.com/en-…60-4ade-9040-e478765b9939


    Ger

    Files

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!