Combine SUMPRODUCT & SUMIF into one formula

yeoman99

New Member
Joined
May 25, 2018
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a dataset that I wish to analyse at summary level for a particular timeframe of the project. See below for example.
ActActFcstAct
JanFebMarAccrualsActuals to Date
Coffee£20£10£5£2£32
Tea£5£8£9£5£18
Juice£7£3£12£6£16
Coffee£12£17£25£13£42
Coffee£74

I have used a combination of SUMPRODUCT & SUMIF to total the Jan, Feb & Accrual columns as below.

=SUMPRODUCT($S$3:$AA$139*($A$3:$A$139=K14))+SUMIF($A$3:$A$139,K14,$BG$3:$BG$139)

It works but looks a little messy. As the accrual column in the actual sheet is away out to the right I'm wondering if there's a way to combine this into one distinct formula that gives me the coffee total without the need for the SUMIF part?

Thanks,
Neil
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
what version of excel are you using?
you can add this to your profile so when you post others will know how to better help you.
 
Upvote 0
N.B. You can post a concise example of your challenge with the forum's tool named XL2BB.
An example will show what data is in the cells; I assumed actual numbers and not text.

The following may help. Try the example (paste it to a clean sheet) and then edit and try it with your data.

SumProduct2022.xlsm
ABCDEF
1
2ActActFcstAct
3JanFebMarAccruals
4Coffee201052
5Tea5895
6Juice73126
7Coffee12172513
8
9Coffee£74
10Coffee74
1174
12
7a
Cell Formulas
RangeFormula
F10F10=SUMPRODUCT(--(A4:A7=E10)*(B4:B7+C4:C7+E4:E7))
F11F11=SUM((A4:A7=E10)*(B4:B7+C4:C7+E4:E7))
 
Upvote 0
here are another couple of ways that may fork for you:
Book1
ABCDEFG
1ActActFcstAct
2JanFebMarAccrualsActuals to DateActuals to Date
3Coffee2010523232
4Tea58951818
5Juice731261616
6Coffee121725134242
7
8Coffee7474
Sheet1
Cell Formulas
RangeFormula
F3:F6F3=SUMIF($B$1:$E$1,"Act",B3:E3)
G3:G6G3=SUM(FILTER(B3:E3,$B$1:$E$1="act"))
F8F8=SUMIF(A3:A6,E8,F3:F6)
G8G8=SUM(FILTER(FILTER(B3:E6,B1:E1="Act"),A3:A6=E8))
Cells with Data Validation
CellAllowCriteria
E8List=$A$3:$A$5
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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