SUBTOTAL IF x cell contain x text

harky

Active Member
Joined
Apr 8, 2010
Messages
408
Office Version
  1. 365
  2. 2024
Platform
  1. Windows
i only know how to use sumif
=SUMIF(G6:G81,"Bank",M6:M81)

how to use this for subtotal? if i filter Col A based on project...
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Why you don't use SUMIFS

 
Upvote 0
Why you don't use SUMIFS

i need to filter, if sumif... it dont work
had a list of diff category. i want to filter it and the total is cal based on what filter
 
Upvote 0
If you're happy to use a helper column, you can put this formula in a blank column by the side of your data
Excel Formula:
=SUBTOTAL(103,A6)
and then you can change your sumif to
Excel Formula:
=SUMIFS(M6:M81,G6:G81,"Bank",X6:X81,1)
change the X6:X81 to whatever column has the subtotal formula
 
Upvote 0
If you're happy to use a helper column, you can put this formula in a blank column by the side of your data
Excel Formula:
=SUBTOTAL(103,A6)
and then you can change your sumif to
Excel Formula:
=SUMIFS(M6:M81,G6:G81,"Bank",X6:X81,1)
change the X6:X81 to whatever column has the subtotal formula
sorry.. i dont understand..
G6:G81is my column which contain Bank and Cash
M6:M81 is the column i want to sum

i dunno how to use subtotal but i notice subtotal can sumup based on the one i filter which is Column A
 
Upvote 0
What is the last used column in your data?
 
Upvote 0
What is the last used column in your data?


this is my table

Book1
ABCDEFGHIJKLMN
2Project NamePR #Issued DateItem DescriptionRemarksTranscation No.RefCredit Debit Subtotal
3$5$10 Amount In $5$10 Amount Out
4Budget1 Jan 2021Balance Bank AccountBank$7,263.97$ 7,263.97
5Budget1 Jan 2021Balance CashCash$1,549.30$ 1,549.30
6
7
8
9
10
11
12Total Expense for this project
13Categories Amount
14Bank$ 7,263.97
15Petty Cash$ 1,549.30
Sheet1
Cell Formulas
RangeFormula
N4:N5N4=IF(G4="Bank",J4+M4,IF(G4="Cash",J4+M4))
N14N14=SUMIF(G4:G78,"Bank",N4:N78)
N15N15=SUMIF(G4:G78,"Cash",N4:N78)
Cells with Data Validation
CellAllowCriteria
G4:G5List=$G$83:$G$88
 
Upvote 0
That data does not match your original formula, or your description.
 
Upvote 0
That data does not match your original formula, or your description.
is correct because the 5 & 10 is for voucher

i had cash, bank & voucher

i think the subtotal column can delete..
mainly is the table at below
 
Upvote 0
That data does not match your original formula, or your description.
like this

Book1
ABCDEFGHIJKLMN
1Project NamePR #Issued DateItem DescriptionRemarksTranscation No.RefCredit Debit Subtotal
2$5$10 Amount In $5$10 Amount Out
3Budget1 Jan 2021Balance b/f from Bank AccountBank$ 7,263.97$7,263.97
4Budget1 Jan 2021Balance b/f from CashCash$ 1,549.30$1,549.30
5Budget1 Jan 2021Balance b/f from $5 VoucherCredit InV51111
6Budget1 Jan 2021Balance b/f from $10 VoucherCredit InV1011
7
8
9
10Current BalanceTotal Expense for this project
11RefCategoriesBalanceRefCategoriesBalance
12BankBank$7,263.97BankBank$ -
13CashPetty Cash$1,549.30CashPetty Cash$ -
14V5$511$5$50
15V10$101$10$100
Sheet1
Cell Formulas
RangeFormula
N3:N6N3=IF(G3="Bank",J3+M3,IF(G3="Cash",J3+M3,IF(G3="V5",H3+K3,IF(G3="V10",I3+L3))))
G12G12=SUMIF(G3:G6,"Bank",N3:N6)
G13G13=SUMIF(G3:G6,"Cash",N3:N6)
G14G14=SUMIF(G3:G6,"V5",N3:N6)
G15G15=SUMIF(G3:G6,"V10",N3:N6)
N12N12=SUMIF(G3:G6,"Bank",M3:M6)
N13N13=SUMIF(G3:G6,"Cash",M3:M6)
N14N14=SUMIF(G3:G6,"V5",M3:M6)
N15N15=SUMIF(G3:G6,"V10",M3:M6)
Cells with Data Validation
CellAllowCriteria
G3:G4List=$G$83:$G$88
G5:G6List=$C$12:$C$15
 
Upvote 0

Forum statistics

Threads
1,225,370
Messages
6,184,569
Members
453,243
Latest member
Jemini Jimi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top