Question on Complex Sum and Count

p9j123

Active Member
Joined
Apr 15, 2014
Messages
288
Office Version
  1. 2013
Platform
  1. Windows
Based on this table, I need help on creating a formula in K3 to count and in K4 to sum based on the following condition

In K3 --> countif B1:G1 = K3, A3:A5 = K1, B3:G5 is number

Book4
ABCDEFG
1JanJanJanFebFebFeb
201-Jan02-Jan03-Jan01-Feb02-Feb03-Feb
3JamesRD100200RD200200
4Aubrey300RD300RDVL300
5Alex100100120200200VL
Sheet1


So in the example below, K3 is 2 and K5 is 600 because it meets all the above criteria.

Book4
JK
1Employee NameAubrey
2MonthJan
3Count2
4Sum600
Sheet1
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Book1
ABCDEFGHIJK
1JanJanJanFebFebFebEmployee NameAubrey
201 January 202302 January 202303 January 202301 February 202302 February 202303 February 2023MonthJan
3James11002001200200Count2
4Aubrey300RD30011300Sum600
5Alex1001001202002001
Sheet2
Cell Formulas
RangeFormula
K3K3=SUMPRODUCT(($A$3:$A$5=K1)*($B$1:$G$1=K2)*ISNUMBER(B3:G5))
K4K4=SUMPRODUCT(($A$3:$A$5=K1)*($B$1:$G$1=K2),B3:G5)
 
Upvote 0
Solution
Thank you so much, this works.
Book1
ABCDEFGHIJK
1JanJanJanFebFebFebEmployee NameAubrey
201 January 202302 January 202303 January 202301 February 202302 February 202303 February 2023MonthJan
3James11002001200200Count2
4Aubrey300RD30011300Sum600
5Alex1001001202002001
Sheet2
Cell Formulas
RangeFormula
K3K3=SUMPRODUCT(($A$3:$A$5=K1)*($B$1:$G$1=K2)*ISNUMBER(B3:G5))
K4K4=SUMPRODUCT(($A$3:$A$5=K1)*($B$1:$G$1=K2),B3:G5)
 
Upvote 0

Forum statistics

Threads
1,215,002
Messages
6,122,652
Members
449,092
Latest member
peppernaut

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