Enhanced sumifs formula???

jeongs1

New Member
Joined
May 23, 2017
Messages
44
Please see the two tables below. So I have one sheet called DATA SHEET and another called INPUT SHEET. Now, I want to calculate the difference between INVOICED and ACCRUED for each month for each product for their specific advertising type. And would like to have the difference shown up in INPUT SHEET. (ex. in the Input sheet, C3 would be -500; 1500-2000).

I have been just manually doing SUMIFS using product and adv type. But is there a way I can add the month to the formula, so that all I have to do is input the data for future months and the formula would pick it up in the input sheet??

Thank you!!!


DATA SHEET #1

ABCDEFGH
ACCRUEDINVOICEDACCRUEDINVOICEDACCRUEDINVOICED
PRODUCTADV. TYPEJAN-17JAN-17FEB-17FEB-17MAR-17MAR-17
GUM
TV200015001000100015002000
GUMRADIO150013001300131514501400
ICE CREAMTV200023002500260025002300
ICE CREAMRADIO120012501200115011001000

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




INPUT SHEET #2

ABCDE
PRODUCTADV. TYPEJAN-17FEB-17MAR-17
GUM
TV
GUMRADIO
ICE CREAMTV
ICE CREAMRADIO

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

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try in C2 this is an array formula and must be entered with CONTROL+SHIFT+ENTER. If done correctly excel will put {} around the formula. Copy across and down
Code:
=INDEX(Sheet1!$C$3:$H$6,MATCH(Sheet2!$A2&Sheet2!$B2,Sheet1!$A$3:$A$6&Sheet1!$B$3:$B$6,0),MATCH(Sheet2!C$1&"invoiced",Sheet1!$C$2:$H$2&Sheet1!$C$1:$H$1,0))-INDEX(Sheet1!$C$3:$H$6,MATCH(Sheet2!$A2&Sheet2!$B2,Sheet1!$A$3:$A$6&Sheet1!$B$3:$B$6,0),MATCH(Sheet2!C$1&"accrued",Sheet1!$C$2:$H$2&Sheet1!$C$1:$H$1,0))
 
Upvote 0
You may also try this non array formula:

=SUMPRODUCT((Sheet2!$A$3:$A$6=$A2)*(Sheet2!$B$3:$B$6=$B2)*(Sheet2!$C$2:$H$2=C$1)*(Sheet2!$C$1:$H$1="INVOICED")*(Sheet2!$C$3:$H$6))-SUMPRODUCT((Sheet2!$A$3:$A$6=$A2)*(Sheet2!$B$3:$B$6=$B2)*(Sheet2!$C$2:$H$2=C$1)*(Sheet2!$C$1:$H$1="ACCRUED")*(Sheet2!$C$3:$H$6))

Change Sheet2 to match your data sheet: Name wasn't clear.. Data Sheet or Data Sheet #1 (ie: Sheet2 change to 'Data Sheet' / 'Data Sheet #1' accordingly)
 
Last edited:
Upvote 0
It's returning me the date... but in the format of Jan-00.
I double checked and triple checked the formula but still returns the result as Jan-00
 
Upvote 0
It's returning me the date... but in the format of Jan-00.
I double checked and triple checked the formula but still returns the result as Jan-00

Which formula did you use?
 
Upvote 0
Can you post an example of the formula you've been using manually thus far?
Well, manually, I've been doing SUMIFS using just the product and the advertising type. And going through each month and dragging the formula. But I want to know if I can add the month in there so that I don't have to do it. All I have to do is input the data inside the data sheet, and let the formula do its job in the input sheet.
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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