SUM of Data based on a Condition & Running Macro. PLEASE HELP!

jmcgillis14

New Member
Joined
Sep 24, 2014
Messages
12
I have a very long list that I run a macro for. I need the total credit cards (Visa + Master Card + American Express) for that day. On top of that I am running a Macro and the date range is different every time. I think I need a formula that consolidates the "Date" Column so it doesn't repeat then I can come up with a rules based on that to pull out the credit cards and add them up? Let me know if there is any way you can help. Thank you! Below is three columns which is an example of the data. To the right is an example of what I am trying to accomplish.

Account Name Amount Date
ACH$24.038/17/2018
Cash$21.008/17/2018
Checks$71.618/17/2018 TRYING TO ACCOMPLISH BELOW:
Credit Card - Visa$156.008/17/2018Total Credits Credit CardsDate
Credit Card - Master Card$25.008/17/2018$181.008/17/2018
Late Fee Revenue$0.008/17/2018$233.008/20/2018
Rental Revenue$0.008/17/2018$671.238/23/2018
Cash$289.228/20/2018
Credit Card - American Express$120.008/20/2018
Credit Card - Visa$113.008/20/2018
Administrative Fee Revenue$0.008/20/2018
Late Fee Revenue$0.008/20/2018
Airport Revenue$0.008/20/2018
Parking Revenue$0.008/20/2018
Parking Revenue$0.008/21/2018
Rental Revenue$0.008/21/2018
Credit Card - Visa$413.008/22/2018
Rental Revenue$0.008/22/2018
Credit Card - American Express$260.008/23/2018
Credit Card - Master Card$59.908/23/2018
Credit Card - Visa$351.338/23/2018

<tbody>
</tbody>
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Book1
ABCDEF
1Account NameAmountDate
2ACH$24.038/17/2018
3Cash$21.008/17/2018
4Checks$71.618/17/20184
5Credit Card - Visa$156.008/17/2018Total Credits Credit CardsDate
6Credit Card - Master Card$25.008/17/2018$181.008/17/2018
7Late Fee Revenue$0.008/17/2018$233.008/20/2018
8Rental Revenue$0.008/17/2018$413.008/22/2018
9Cash$289.228/20/2018$671.238/23/2018
10Credit Card - American Express$120.008/20/2018
11Credit Card - Visa$113.008/20/2018
12Administrative Fee Revenue$0.008/20/2018
13Late Fee Revenue$0.008/20/2018
14Airport Revenue$0.008/20/2018
15Parking Revenue$0.008/20/2018
16Parking Revenue$0.008/21/2018
17Rental Revenue$0.008/21/2018
18Credit Card - Visa$413.008/22/2018
19Rental Revenue$0.008/22/2018
20Credit Card - American Express$260.008/23/2018
21Credit Card - Master Card$59.908/23/2018
22Credit Card - Visa$351.338/23/2018
Sheet1


In F4 control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH("credit card",$A$2:$A$22)),$C$2:$C$22),$C$2:$C$22),1))

In E6 just enter and copy down:

=IF($F6="","",SUMIFS($B$2:$B$22,$A$2:$A$22,"*credit card*",$C$2:$C$22,$F6))

In F6 control+shift+enter, not just enter, and copy down:

=IF(ROWS($1:1)>$F$4,"",MIN(IF(ISNUMBER(SEARCH("credit card",$A$2:$A$22)),IF(ISNA(MATCH($C$2:$C$22,$F$5:F5,0)),$C$2:$C$22))))
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,844
Members
449,193
Latest member
MikeVol

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