SUMIFS with multiple columns?

goldmansnacks

New Member
Joined
Jan 6, 2016
Messages
3
I'm having trouble figuring this out. I feel like SUMPRODUCT may be the required formula. Here's the situation:

The application is for income statements.

Across the columns is the month-end dates (1/31, 2/28, 3/31) etc... The column preceding the dates is the line items (revenue, COGS, opex, etc. - but multiple instances of each one (for different entities))

If I pick two dates, say 1/31 and 3/31 in different cells on a new sheet (column A and B), I want to sum the revenue (or whatever line item) for the range of A:C, or 1/31:3/31 on the original data sheet.

Previously, I was using INDEX for the sum range, and MATCH to select the date across the columns, but this doesn't capture a range of columns, it only looks up one date and then SUMIF works.

Ideally, I'd have two inputs: a month end date, and an input below to hard code how many months you want to backtrack from that date (EOMONTH of date, -3 etc)

My description of this may be heavily convoluted, I'll be more than happy to clarify/add color.

Thanks so much in advance - you guys rock.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Control+shift+enter, not just enter:

=SUM(IF(LineItemRange=LineItem,IF(DateHeader>=Date1,IF(DateHeader<=Date2,FigureRange))))

Hope you can work with this.
 
Upvote 0
Control+shift+enter, not just enter:

=SUM(IF(LineItemRange=LineItem,IF(DateHeader>=Date1,IF(DateHeader<=Date2,FigureRange))))

Hope you can work with this.

Here's what I used:

{=SUM(IF('PL Data Stack'!$F$7:$F$200=$F18,IF('PL Data Stack'!$G$6:$CX$6>$G$11,IF('PL Data Stack'!$G$6:$CX$6<=$H$11,'PL Data Stack'!$G$7:$CX$200))))}

Worked like an absolute charm. Thank you Aladin!!!
 
Upvote 0
Here's what I used:

{=SUM(IF('PL Data Stack'!$F$7:$F$200=$F18,IF('PL Data Stack'!$G$6:$CX$6>$G$11,IF('PL Data Stack'!$G$6:$CX$6<=$H$11,'PL Data Stack'!$G$7:$CX$200))))}

Worked like an absolute charm. Thank you Aladin!!!

Great mapping. Thanks for the update.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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