Forum Discussion

goncalogera's avatar
goncalogera
Copper Contributor
Nov 13, 2020
Solved

Create a custom SUM(IF) function with VBA

Hi there, I have a table called ("Vendas2020") that has the daily sales and each row has either "C" or "V" if they're either a purchase or a sale (C/V column is the fifth one and is called "Compra...
  • JMB17's avatar
    Nov 13, 2020

    goncalogera 

     

    If I understand what you're trying to do (conditional subtotal), then I don't think you don't need vba. 

     

    I attached an example file - if you filter column 1 for either "A" or "B", then the formula below the table will subtotal the visible cells where Compra/Venda=C.

     

Resources