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...
 
With that layout try it like
+Fluff 1.xlsm
ABCDEFGHIJKLMNO
1Project NamePR #Issued DateItem DescriptionRemarksTranscation No.RefCredit Debit Subtotal
2510 Amount In 510 Amount Out
3Budget44197Balance b/f from Bank AccountBank7263.977263.971
4Budget44197Balance b/f from CashCash1549.31549.31
5Budget44197Balance b/f from $5 VoucherCredit InV511111
6Budget44197Balance b/f from $10 VoucherCredit InV10111
7
8
9
10Current Balance
11RefCategoriesBalance
12BankBank7263.97
13CashPetty Cash1549.3
14V5511
15V10101
Data
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))))
O3:O6O3=SUBTOTAL(103,A3)
G12G12=SUMIFS(N3:N6,G3:G6,"Bank",O3:O6,1)
G13G13=SUMIFS(N3:N6,G3:G6,"Cash",O3:O6,1)
G14G14=SUMIFS(N3:N6,G3:G6,"V5",O3:O6,1)
G15G15=SUMIFS(N3:N6,G3:G6,"V10",O3:O6,1)
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
With that layout try it like
+Fluff 1.xlsm
ABCDEFGHIJKLMNO
1Project NamePR #Issued DateItem DescriptionRemarksTranscation No.RefCredit Debit Subtotal
2510 Amount In 510 Amount Out
3Budget44197Balance b/f from Bank AccountBank7263.977263.971
4Budget44197Balance b/f from CashCash1549.31549.31
5Budget44197Balance b/f from $5 VoucherCredit InV511111
6Budget44197Balance b/f from $10 VoucherCredit InV10111
7
8
9
10Current Balance
11RefCategoriesBalance
12BankBank7263.97
13CashPetty Cash1549.3
14V5511
15V10101
Data
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))))
O3:O6O3=SUBTOTAL(103,A3)
G12G12=SUMIFS(N3:N6,G3:G6,"Bank",O3:O6,1)
G13G13=SUMIFS(N3:N6,G3:G6,"Cash",O3:O6,1)
G14G14=SUMIFS(N3:N6,G3:G6,"V5",O3:O6,1)
G15G15=SUMIFS(N3:N6,G3:G6,"V10",O3:O6,1)
oh tht hard to understand
it work but =SUBTOTAL(103,A3) is a must?
 
Upvote 0
Yes it is, unless you want something even more complex.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,225,371
Messages
6,184,583
Members
453,244
Latest member
Todd Luet

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