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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
All the cells are formatted the same way.

That doesn't answer the question.... and doesn't help to solve the issue. Specifics, and humor us, post exactly the formula you have been using and copying across manually please?
 
Upvote 0
My apologies...

=SUMIFS('DATA SHEET'!D:D,'DATA SHEET'!$B:$B,'INPUT SHEET'!$B2,'DATA SHEET'!$A:$A,'INPUT SHEET'!$A2)-SUMIFS('DATA SHEET'!C:C,'DATA SHEET'!$B:$B,'INPUT SHEET'!$B2,'DATA SHEET'!$A:$A,'INPUT SHEET'!$A2)

This is the formula that I've been using. And for Feb, I would simply just change the sum range according the the month.
 
Upvote 0
Try
Code:
=SUMIFS(INDEX('DATA SHEET'!$D:$H,0,MATCH('INPUT SHEET'!C$1,'DATA SHEET'!$C$2:$G$2,0)),'DATA SHEET'!$B:$B,'INPUT SHEET'!$B2,'DATA SHEET'!$A:$A,'INPUT SHEET'!$A2)-SUMIFS(INDEX('DATA SHEET'!$C:$G,0,MATCH('INPUT SHEET'!C$1,'DATA SHEET'!$C$2:$G$2,0)),'DATA SHEET'!$B:$B,'INPUT SHEET'!$B2,'DATA SHEET'!$A:$A,'INPUT SHEET'!$A2)
 
Upvote 0
IT WORKED!! but does the array for INDEX have to start at column D and column C? They both can't be starting at C??? Just curious...
Try
Code:
=SUMIFS(INDEX('DATA SHEET'!$D:$H,0,MATCH('INPUT SHEET'!C$1,'DATA SHEET'!$C$2:$G$2,0)),'DATA SHEET'!$B:$B,'INPUT SHEET'!$B2,'DATA SHEET'!$A:$A,'INPUT SHEET'!$A2)-SUMIFS(INDEX('DATA SHEET'!$C:$G,0,MATCH('INPUT SHEET'!C$1,'DATA SHEET'!$C$2:$G$2,0)),'DATA SHEET'!$B:$B,'INPUT SHEET'!$B2,'DATA SHEET'!$A:$A,'INPUT SHEET'!$A2)
 
Upvote 0
You can start both at C, but you'd have ADD 1 to the match function in the one that I started in D.
 
Upvote 0
Just one more thing. Sorry again. But if we have two sponsors, see below, Now, using the formula you told me, I was able to do it for Mr.J without any issue. Now, I tried to do the same thing for Mr.K, but it's returning the result as #N/A. Now, I can't separate the DATA SHEET into two, since that's how my team receives it...



DATA SHEET

ABCDEFGHIJ
ACCRUEDACCRUEDINVOICEDINVOICEDACCRUEDACCRUEDINVOICEDINVOICED
PRODUCTADV. TYPEJAN-17JAN-17JAN-17JAN-17FEB-17FEB-17FEB-17FEB-17



GUM


TV
MR. J

2000
MR.K

1500
MR.J

1000
MR.K

1000
MR.J

1500
MR.K

2000
GUMRADIO150013001300131514501400
ICE CREAMTV200023002500260025002300
ICE CREAMRADIO120012501200115011001000

<tbody>
</tbody>


INPUT SHEET -MR.J

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

<tbody>
</tbody>



INPUT SHEET -MR.K


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

<tbody>
</tbody>


You're welcome
 
Last edited:
Upvote 0
Sorry I don't understand what you're trying to add to it.
And something went wrong with your Input Sheet formatting on the forum.
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,273
Members
449,219
Latest member
daynle

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