SUMIF on 1 row and 2 column criteria

csherman7992

New Member
Joined
Dec 14, 2016
Messages
3
My data looks like this:
Jan
Feb
Mar
Apr
AAA5678
AAB9101112
BBA13141516
BBB17181920
CCA21222324
CCB25262728

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


I want to be able to sum all data in Row "X" that happens before Mar (based on header row). The row I want to sum is based on the criteria in the first two columns (ie sum the row that has "B" in column A and "BB" in column c).

How would I go about doing this?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

godsaaint

Active Member
Joined
Sep 16, 2016
Messages
285
How do you have the months formatted? Are they formatted as text and you type, "Jan", "Feb", etc?

EDIT:

You could do something like this as long as your months are formatted as date:

Formula in D11(SUM), confirm with CTRL-SHIFT-ENTER: =

SUMIFS(INDEX(C2:F7,MATCH(D12&D13,A2:A7&B2:B7,0),0),C1:F1,"<"&D14)
ene-16
feb-16
mar-16
abr-16
A
AA
5
6
7
8
A
AB
9
10
11
12
B
BA
13
14
15
16
B
BB
17
18
19
20
C
CA
21
22
23
24
C
CB
25
26
27
28
SUM
19
1st Criteria
A
2nd Criteria
AB
Before
mar-16

<tbody>
</tbody>
 
Last edited:
Upvote 0

Tetra201

MrExcel MVP
Joined
Oct 14, 2016
Messages
3,801
No. They're formatted 1/1/17, 2/1/17, etc.
Try the following formula (to be entered using Ctrl+Shift+Enter, not just Enter):

=SUMIF(C1:F1,"<"&"2017-3-1",INDEX(C1:F9,MATCH("B"&"BB",A1:A9&B1:B9,0),0))
 
Upvote 0

Forum statistics

Threads
1,190,836
Messages
5,983,174
Members
439,825
Latest member
AdamS92

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
Top