Sum If based on selection

cunningAce

Board Regular
Joined
Dec 21, 2017
Messages
91
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am looking for a formula that takes the Week Number, and sums anything in the relevant column but also based on the code as in the below example.

So here I would want the total for all codes 'A1' in week '201809'?

Code201807201808201809201810 Week >201809
A110152025 A165
A111162126 B122
B112172227
C113182328
A114192429

<colgroup><col width="64" style="width:48pt" span="8"> </colgroup><tbody>
</tbody>

Thanks in advance.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
something like...

Unknown
ABCDEFGH
1Code201807201808201809201810Week >201809
2A110152025A165
3A111162126B122
4B112172227
5C113182328
6A114192429

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
H2=SUMPRODUCT(($B$2:$E$6),($B$1:$E$1=$H$1)*($A$2:$A$6=G2))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,792
Messages
6,121,612
Members
449,039
Latest member
Mbone Mathonsi

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