Formula help

mrskidder

New Member
Joined
May 22, 2015
Messages
23
Hello,

I am trying to put together a formula that will take into account cc type as well as a date range to total up a sum for a summary page.

[TABLE="width: 371"]
<tbody>[TR]
[TD]Card Type[/TD]
[TD] Settle Date[/TD]
[TD]Batch No.[/TD]
[TD]Items[/TD]
[TD]Sales Amount[/TD]
[/TR]
[TR]
[TD]MC[/TD]
[TD]04/28/2017[/TD]
[TD]10[/TD]
[TD]2.00[/TD]
[TD]$172.96[/TD]
[/TR]
[TR]
[TD]VI[/TD]
[TD]04/28/2017[/TD]
[TD]10[/TD]
[TD]1.00[/TD]
[TD]$83.15[/TD]
[/TR]
[TR]
[TD]VI[/TD]
[TD]04/29/2017[/TD]
[TD]11[/TD]
[TD]2.00[/TD]
[TD]$251.98[/TD]
[/TR]
[TR]
[TD]MC[/TD]
[TD]04/30/2017[/TD]
[TD]12[/TD]
[TD]1.00[/TD]
[TD]$41.53[/TD]
[/TR]
[TR]
[TD]VI[/TD]
[TD]04/30/2017[/TD]
[TD]12[/TD]
[TD]5.00[/TD]
[TD]$3,264.79[/TD]
[/TR]
[TR]
[TD]MC[/TD]
[TD]05/01/2017[/TD]
[TD]13[/TD]
[TD]2.00[/TD]
[TD]$3,470.33[/TD]
[/TR]
[TR]
[TD]VI[/TD]
[TD]05/01/2017[/TD]
[TD]13[/TD]
[TD]1.00[/TD]
[TD]$90.60[/TD]
[/TR]
[TR]
[TD]MC[/TD]
[TD]05/02/2017[/TD]
[TD]14[/TD]
[TD]1.00[/TD]
[TD]$167.94[/TD]
[/TR]
[TR]
[TD]VI[/TD]
[TD]05/02/2017[/TD]
[TD]14[/TD]
[TD]1.00[/TD]
[TD]$110.36[/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col></colgroup>[/TABLE]


What formula would I use if I want to only pull MC for dates between 4/28 & 5/1?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thank you. I forgot that I need another column with several options. For example:

[TABLE="width: 614"]
<tbody>[TR]
[TD]891512[/TD]
[TD]MC[/TD]
[TD]05/24/2017[/TD]
[TD]355[/TD]
[TD]2.00[/TD]
[TD]$140.00[/TD]
[TD]$.00[/TD]
[TD]$140.00[/TD]
[/TR]
[TR]
[TD]891512[/TD]
[TD]VI[/TD]
[TD]05/24/2017[/TD]
[TD]355[/TD]
[TD]11.00[/TD]
[TD]$430.00[/TD]
[TD]$.00[/TD]
[TD]$430.00[/TD]
[/TR]
[TR]
[TD]891509[/TD]
[TD]VI[/TD]
[TD]05/01/2017[/TD]
[TD]61[/TD]
[TD]1.00[/TD]
[TD]$30.00[/TD]
[TD]$.00[/TD]
[TD]$30.00[/TD]
[/TR]
[TR]
[TD]891425[/TD]
[TD]VI[/TD]
[TD]04/28/2017[/TD]
[TD]342[/TD]
[TD]1.00[/TD]
[TD]$2,360.00[/TD]
[TD]$.00[/TD]
[TD]$2,360.00[/TD]
[/TR]
[TR]
[TD]891425[/TD]
[TD]VI[/TD]
[TD]04/28/2017[/TD]
[TD]343[/TD]
[TD]1.00[/TD]
[TD]$437.00[/TD]
[TD]$.00[/TD]
[TD]$437.00[/TD]
[/TR]
[TR]
[TD]891425[/TD]
[TD]VI[/TD]
[TD]04/29/2017[/TD]
[TD]344[/TD]
[TD]1.00[/TD]
[TD]$1,614.40[/TD]
[TD]$.00[/TD]
[TD]$1,614.40[/TD]
[/TR]
[TR]
[TD]891425[/TD]
[TD]VI[/TD]
[TD]05/01/2017[/TD]
[TD]345[/TD]
[TD]1.00[/TD]
[TD]$175.00[/TD]
[TD]$.00[/TD]
[TD]$175.00[/TD]
[/TR]
[TR]
[TD]891425[/TD]
[TD]MC[/TD]
[TD]05/01/2017[/TD]
[TD]346[/TD]
[TD]1.00[/TD]
[TD]$.00[/TD]
[TD]-$6.50[/TD]
[TD]-$6.50[/TD]
[/TR]
[TR]
[TD]891425[/TD]
[TD]MC[/TD]
[TD]05/02/2017[/TD]
[TD]347[/TD]
[TD]1.00[/TD]
[TD]$2,295.50[/TD]
[TD]$.00[/TD]
[TD]$2,295.50[/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col><col><col><col></colgroup>[/TABLE]


I am needing to get the sum of VI & MC in 891425 & 891512 for the date range of 4/28-5/1/17. How much more does this complicate the formula?
 
Upvote 0
I am needing to get the sum of VI & MC in 891425 & 891512 for the date range of 4/28-5/1/17. How much more does this complicate the formula?

Not much. This should do it:


Excel 2010
ABCDEFGH
1Card TypeSettle DateBatch No.ItemsSales Amount$4,586.40
2891512MC5/24/20173552$140.00
3891512VI5/24/201735511$430.00
4891509VI5/1/2017611$30.00
5891425VI4/28/20173421$2,360.00
6891425VI4/28/20173431$437.00
7891425VI4/29/20173441$1,614.40
8891425VI5/1/20173451$175.00
9891425MC5/1/20173461$0.00
10891425MC5/2/20173471$2,295.50
Sheet1
Cell Formulas
RangeFormula
H1=SUM(SUMIFS(F:F,B:B,{"VI","MC"},A:A,{891425,891512},C:C,">="&DATE(2017,4,28),C:C,"<="&DATE(2017,5,1)))
 
Upvote 0
I'm not sure what I'm doing wrong but here is my formula. The 'Merchant Connect' is just the other sheet that the data is on. I am looking for the sum with column I being the dollar totals, column B I need 891415 & 891425, column C is VI & MC, column D is the date.

=SUM(SUMIFS('Merchant Connect'!I2:I5893,'Merchant Connect'!B:B,{891425,891512},'Merchant Connect'!C:C,{"VI","MC"},'Merchant Connect'!D:D,">="&DATE(2017,4,27),'Merchant Connect'!D:D,"<="&DATE(2017,5,3)))

All I'm getting is #VALUE so I'm unsure what I did wrong.
 
Upvote 0
@falcondude

I think your formula needs a small adjustment. Change the value in F9 from 0 to, say, 50.
Your formula returns the same value 4586,40, when it should return 4636,40

To fix it try (observe the ; instead of ,)
=SUM(SUMIFS(F:F,B:B,{"VI","MC"},A:A,{891425;891512},C:C,">="&DATE(2017,4,28),C:C,"<="&DATE(2017,5,1)))

Using two array criteria one must be a horizontal array (values separated by commas) and the other a vertical array (values separated by semicolons)

M.
 
Upvote 0
=SUM(SUMIFS(F:F,B:B,{"VI","MC"},A:A,{891425;891512},C:C,">="&DATE(2017,4,28),C:C,"<="&DATE(2017,5,1)))

Using two array criteria one must be a horizontal array (values separated by commas) and the other a vertical array (values separated by semicolons)

Good catch!

I'm not sure what I'm doing wrong but here is my formula. The 'Merchant Connect' is just the other sheet that the data is on. I am looking for the sum with column I being the dollar totals, column B I need 891415 & 891425, column C is VI & MC, column D is the date.

=SUM(SUMIFS('Merchant Connect'!I2:I5893,'Merchant Connect'!B:B,{891425,891512},'Merchant Connect'!C:C,{"VI","MC"},'Merchant Connect'!D:D,">="&DATE(2017,4,27),'Merchant Connect'!D:D,"<="&DATE(2017,5,3)))

All I'm getting is #VALUE so I'm unsure what I did wrong.

Ranges in a SUMIFS formula must be the same dimensions. Also, take note of what Marcelo pointed out above and change the comma to a semicolon.
 
Upvote 0

Forum statistics

Threads
1,223,919
Messages
6,175,368
Members
452,638
Latest member
Oluwabukunmi

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