Hello, I am new to this forum and been trying to figure this out for hours. I have searched google for possible solutions but can't seem to come up with the right formula. I am trying to have my credit card statement in excel table, that simply shows date, price, retail store, and type of purchase. I attached a sample version of the table, I hope it shows what I am trying to do. I want to be able to have it filtered by dates so it shows only purchases made during current statement. I know how to filter it to get what I want visible, but I can't figure the formula for the next part. I want it to add together the total "price" of the "type of purchases" that cells are only visible and not the whole worksheet. Right now the code I have as seen below will calculate the sections for the entire workbook whether the cells are visible or not depending on dates selected. From the second table, I will use these to create a pie chart that shows how the current statement money is divided, that way I can see how my money is being divided and where, Which I have the pie chart currently displaying the what I get from the equation below.
The code I have been trying to get correct but haven't is: =SUMPRODUCT(D2:D169,SUBTOTAL(109,OFFSET(C2,ROW(D2:D169)-ROW(D2:D169),,1))--(C2:C169="Costumes"))
Any help would be greatly appreciated. Thanks in advance!
Date Retail Store Type of Purchase Price 9/17/2019 Party City Costumes $29.94 9/18/2019 Walmart Grocery $68.05 9/18/2019 Sapp Bros Snacks $3.73 9/19/2019 Casey's Gas $30.59 9/19/2019 Hy-Vee Grocery $15.67
Costumes =SUMPRODUCT(D2:D169,SUBTOTAL(109,OFFSET(C2,ROW(D2:D169)-ROW(D2:D169),,1))--(C2:C169="Costumes")) Grocery $83.72 Snacks $3.73
Bookmarks