Index Match with Multiple Criteria including most recent date/last day of the month

Dudetrek

New Member
Joined
Jun 13, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I'm an Excel 365 user, and a very new one at that. Forgive me for my lack of etiquette within this forum, I hope that this first post may help introduce me to a way to solve this specific problem of mine, as well as to learn more about Excel 365 in general, and how to properly interact with this forum community. Thanks for any and all guidance and advice :)

The 5x10 table is in a sheet called "Transactions" and the 2x4 Table is in a sheet called "TotalsMonthly". Let's assume today's date is still in February of 2022. I'm trying to create a function to place into cell C2 of "TotalsMonthly" so that I can fill the rest of the C Column (for January, which is already over) and B Column (for February, which hasn't ended yet) with running account totals. I've tried INDEX/MATCH functions like this one below:

=INDEX(Transactions!$A:$E,MATCH(TotalsMonthly!$A2,(Transactions!$A:$A>=TotalsMonthly!C$1)*(Transactions!$A:$A<TotalsMonthly!B$1)),5)

But I keep getting either "You can't change part of an array" notices, and/or "N/A" inside the C2 of "TotalsMonthly".

Hope I'm getting my message across clearly enough to interpret, and if not, I am happy to clarify to the best of my abilities. Obviously, these tables are an equivalent of the excel tables I'm trying to work with, but the real tables contain my actual financial information, which I'd rather not disclose.


"Transactions"
DateMerchantAmountAccountAccount Total
2/21/2022Paycheck250Chase Checking1350
2/16/2022Amazon-50Chase Checking1100
2/6/2022Transfer120Chase Savings2120
2/6/2022Transfer-120Cash94.5
2/6/2022Server Tips120Cash214.5
1/28/2022Paycheck250Chase Checking1150
1/12/2022Mcdonalds-5.50Cash94.5
1/1/2022Cash Withdrawal100Cash100
1/1/2022Cash Withdrawal-100Chase Checking900

"TotalsMonthly"
Account2/1/20221/1/2022
Cash??
Chase Checking??
Chase Savings??

Thanks so much for your time, and I will continue plowing through the forums looking for more learning opportunities while this post makes its way across the forum. Happy spreadsheeting!

-Dudetrek
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try this:

=INDEX(Transactions!$E:$E,MATCH(1,(TotalsMonthly!$A2=Transactions!$D:$D)*(Transactions!$A:$A>=TotalsMonthly!C$1)*(Transactions!$A:$A<TotalsMonthly!B$1),0))

.
 
Upvote 0
Welcome to the MrExcel board!

If you still need help with this, please manually complete the expected results in 'TotalsMonthly' using the sample data shown in post #1 , post that sheet again and explain how you got those results manually.

BTW, for the future I suggest that you investigate XL2BB for providing sample data & expected results to make it easier for helpers to understand just what you have & where it is and also what you want & where it is to be.
 
Upvote 0
Phuoc- that Index/Match formula spit out "N/A" for me again. :/

Peter_SSs- I got onboard with XL2BB and below is the exact data from my sheets. The first sheet is "Transactions", the second sheet is "Totals Monthly" with the manually inputted results I expect to get.

  • For example, I got Totals Monthly B91 by referring to Transactions H2 (the most recent day from the month of June with "Cash" under "Account Name"/Column G). Similarly, I got Totals Monthly C91 by referring to Transactions H79 (...month of May...)
  • Totals Monthly B93 refers to Transactions H10
  • Totals Monthly C93 refers to Transactions H81
  • Etc., Etc.
Maybe with the full data, ya'll will notice something important I didn't make clear in my first post with the simulated table. Thanks much!

Master Accounting.xlsb.xlsx
ABCDEFGH
1DateMerchantAmountSubCategoryCategoryParentAccount NameAccount Total
206/27/2022WWV100AM Daily SorrelTipsCashCash0
306/27/2022EUCCU500TransferTransferBankingEUCCU Visa500
406/27/2022EUCCU-500TransferTransferBankingEUCCU Checking3262.34
506/27/2022EUCCU-1565WithdrawalTransferBankingCash-100
606/27/2022EUCCU782.5DepositTransferBankingEUCCU Savings4264.5
706/27/2022EUCCU782.5DepositTransferBankingEUCCU Checking3762.34
806/26/2022Deborah-10Shuttle DriverTipsCashCash1465
906/26/2022WWV100AM Daily SorrelTipsCashCash1475
1006/25/2022T & H CORNER Store-10.75LooseTobaccoSmokablesBofA Checking3152.4
1106/25/2022Food Truck Park93BuskingMusic IncomeCashCash1375
1206/25/2022WWV50Ropes CourseTipsCashCash1282
1306/24/202298 Center96.798 CenterPaycheckDigitalBofA Checking3163.15
1406/24/2022Deborah-10Shuttle DriverTipsCashCash1232
1506/24/2022WWV100LC DuckyTipsCashCash1242
1606/23/2022T & H CORNER Store-9.14PackTobaccoSmokablesBofA Checking3066.45
1706/23/2022Food Truck Park64BuskingMusic IncomeCashCash1142
1806/23/2022WWV80Ropes CourseTipsDigitalVenmo250
1906/22/2022City Market-76.09LocalGroceriesFood and DrinkBofA Checking3075.59
2006/21/2022WWV60AM DailyTipsCashCash1078
2106/21/2022Crystal Shop48BuskingMusic IncomeCashCash1018
2206/20/2022Maverick-8.4PackTobaccoSmokablesBofA Checking3151.68
2306/20/2022Maverick-1.93TravellingCoffee ShopsFood and DrinkBofA Checking3160.08
2406/19/2022Smith's-6.79TravellingGroceriesFood and DrinkBofA Checking3162.01
2506/19/2022Harmons SLC-3.09TravellingGroceriesFood and DrinkBofA Checking3168.8
2606/19/2022Higher Ground Coffee SLC-3TravellingCoffee ShopsFood and DrinkCash970
2706/18/2022Speedway SLC-33.32SLC with JeffPublic TransportationTransportationBofA Checking3171.89
2806/18/2022Stonefed288HogwallowMusic IncomeCashCash973
2906/17/2022WWV987.1WWVPaycheckDigitalBofA Checking3205.21
3006/17/2022Stonefed270HogwallowMusic IncomeCashCash685
3106/17/2022Accounting Error-90Accounting ErrorAccounting ErrorCashCash415
3206/17/2022Bank of America600TransferTransferBankingBofA Savings3097.76
3306/17/2022Bank of America-600TransferTransferBankingBofA Checking2218.11
3406/16/2022Adam-10Shuttle DriverTipsDigitalVenmo170
3506/16/2022WWV100LC DailyTipsDigitalVenmo180
3606/15/2022Gena-10Shuttle DriverTipsCashCash505
3706/15/2022WWV80Full DailyTipsCashCash515
3806/14/2022WWV50Ropes CourseTipsCashCash435
3906/14/2022Gena-5Shuttle DriverTipsCashCash385
4006/14/2022WWV30LC RaftTipsCashCash390
4106/13/2022WWV40Ropes CourseTipsDigitalVenmo80
4206/12/2022Gena-5Shuttle DriverTipsCashCash360
4306/12/2022WWV40LC DailyTipsCashCash365
4406/11/2022WWV80LC Daily SorrelTipsCashCash325
4506/10/202298 Center489.2598 CenterPaycheckDigitalBofA Checking2818.11
4606/10/2022WWV100LC DailyTipsCashCash245
4706/10/2022City Market-27.2Nicotine GumTobaccoSmokablesBofA Checking2328.86
4806/09/2022WWV40RentalsTipsCashCash145
4906/09/2022WWV40AM DuckyTipsCashCash105
5006/08/2022WWV65LC DailyTipsCashCash65
5106/08/2022Accounting Error-100.7Accounting ErrorAccounting ErrorCashCash0
5206/08/2022EUCCU-3688WithdrawalTransferBankingCash100.7
5306/08/2022EUCCU1844DepositTransferBankingEUCCU Savings3482
5406/08/2022EUCCU1844DepositTranserBankingEUCCU Checking2979.84
5506/07/2022Gear Traders-2.36Bike LockService & PartsTransportationBofA Checking2356.06
5606/07/2022Mark-10Shuttle DriverTipsCashCash3788.7
5706/07/2022WWV110AM DailyTipsCashCash3798.7
5806/06/2022Maverick-10.11PackTobaccoSmokablesBofA Checking2358.42
5906/05/2022WWV50AM DailyTipsCashCash3688.7
6006/04/2022City Market-5.45LocalGroceriesFood and DrinkBofA Checking2368.53
6106/04/2022Stonefed280Woody'sMusic IncomeCashCash3638.7
6206/04/2022WWV100LC Daily SorrelTipsCashCash3358.7
6306/04/2022WWV698.27WWVPaycheckDigitalBofA Checking2373.98
6406/03/2022Stonefed305Woody'sMusic IncomeCashCash3258.7
6506/03/2022Sam Welch (Navtec)50GiftsGifts ReceivedGiftsCash2953.7
6606/02/2022Chevron Moab-27.72LooseTobaccoSmokablesCash2903.7
6706/02/2022Gena-10Shuttle DriverTipsCashCash2931.42
6806/02/2022WWV20LC DailyTipsDigitalVenmo40
6906/02/2022City Market-16.21LocalGroceriesFood and DrinkBofA Checking1675.71
7006/02/2022WWV100LC DailyTipsCashCash2941.42
7106/02/2022WWV60Ropes CourseTipsCashCash2841.42
7206/01/2022Wire Transfer Fee-3Bank FeeService FeeBankingBofA Checking1691.92
7306/01/2022Theresa-300Park LaneRentLodgingCash2781.42
7406/01/2022Christian and Jessica280DogsittingSide HustlesCashCash3081.42
7506/01/2022Salt Lake Express-71.85Bus Ticket back to MoabPublic TransportationTransportationBofA Checking1694.92
7606/01/2022FB Marketplace25Garmin GPS unitSide HustlesCashCash2801.42
7706/01/2022The Land-860WithdrawalLand WithdrawalThe LandBofA Checking1766.77
7806/01/2022The Land860DepositLand DepositThe LandReal Estate Investment23440
7905/31/2022Gena-40Shuttle DriverTipsCashCash2776.42
8005/31/2022WWV200LC Daily SorrelTipsCashCash2816.42
8105/30/2022Maverick-10.11LooseTobaccoSmokablesBofA Checking2626.77
8205/28/2022Meandercat450Woody'sMusic IncomeCashCash2616.42
8305/28/2022T & H CORNER Store-9LooseTobaccoSmokablesCash2166.42
8405/28/2022WWV30LC DailyTipsCashCash2175.42
8505/28/2022WWV40Ropes CourseTipsCashCash2145.42
8605/27/2022Drunk at the bar1LooseTobaccoSmokablesCash2105.42
8705/27/2022City Market-2.58LocalGroceriesFood and DrinkCash2104.42
8805/27/2022WWV80LC DuckyTipsCashCash2107
8905/26/2022True Value-7.06JB WeldService & PartsShoppingBofA Checking2636.88
9005/26/202298 Center351.4198 CenterPaycheckDigitalBofA Checking2643.94
9105/26/2022City Market-10.63LocalGroceriesFood and DrinkBofA Checking2292.53
9205/26/2022RR Moab-9.79LooseTobaccoSmokablesBofA Checking2303.16
9305/26/2022USPS (mailing forgotten stuff back to dad from stillwater trip)-13.85ShippingShippingServicesBofA Checking2312.95
9405/25/2022Kevin-10Shuttle DriverTipsDigitalVenmo20
9505/25/2022WWV100AM DailyTipsCashCash2027
9605/24/2022WWV50Full DailyTipsCashCash1927
9705/23/2022T & H CORNER Store-10.75LooseTobaccoSmokablesBofA Checking2326.8
9805/22/2022Higher Ground Coffee SLC-2TravellingCoffee ShopsFood and DrinkCash1877
9905/22/2022Olympus Hills SLC gas-57.61SLC with JeffPublic TransportationTransportationBofA Checking2337.55
10005/22/2022Smith's-7.29TravellingGroceriesFood and DrinkBofA Checking2395.16
10105/21/2022Stonefed275HogwallowMusic IncomeCashCash1879
10205/21/2022Maverick-8.84PackTobaccoSmokablesBofA Checking2402.45
10305/20/2022WWV120LC DailyTipsCashCash1604
10405/20/2022WWV20Ropes CourseTipsCashCash1484
10505/20/2022Walker Drug-2.82PapersTobaccoSmokablesBofA Checking2411.29
10605/19/2022Dao-10Shuttle DriverTipsCashCash1464
10705/19/2022WWV100AM DailyTipsCashCash1474
10805/19/2022NOLS-385WFRCertificationsEducationBofA Checking2414.11
10905/15/2022T & H CORNER Store-1.95LocalGroceriesFood and DrinkBofA Checking2799.11
11005/15/2022Texs Riverways-80ToursPublic TransportationTransportationCash1374
11105/15/2022T & H CORNER Store-29.27LooseTobaccoSmokablesBofA Checking2801.06
11205/13/202298 Center290.198 CenterPaycheckDigitalBofA Checking2830.33
11305/08/2022Theresa-40ToursSporting GoodsServicesCash1454
11405/08/2022Texs Riverways-233.72ToursPublic TransportationTransportationBofA Checking2540.23
11505/07/2022Stonefed526Woody'sMusic IncomeCashCash1494
11605/07/2022T & H CORNER Store-13.73LooseTobaccoSmokablesBofA Checking2773.95
11705/06/2022WWV335.29WWVPaycheckDigitalBofA Checking2787.68
11805/05/2022Moab Landscaping192.02LandscapingPaycheckDigitalBofA Savings2497.76
11905/04/2022Moonflower-21.84LocalGroceriesFood and DrinkBofA Checking2452.39
12005/04/2022Gear Traders-39.1830 wag bagsSporting GoodsShoppingBofA Checking2474.23
12105/04/2022Gear Traders-17.39200' ParacordSporting GoodsShoppingBofA Checking2513.41
12205/04/2022City Market-131.82LocalGroceriesFood and DrinkBofA Checking2530.8
12305/03/2022Maverick-10.44PackTobaccoSmokablesBofA Checking2662.62
12405/03/2022Theresa-250Park LaneRentLodgingCash968
12505/02/2022Wire Transfer Fee-3Bank FeeService FeeBankingBofA Checking2673.06
12605/02/2022True Value-8.7Plastic WeldHobbiesShoppingBofA Checking2676.06
12705/02/2022Walker Drug-2.49HeadphonesElectronicsShoppingBofA Checking2684.76
12805/02/2022The Land-860WithdrawalLand WithdrawalThe LandBofA Checking2687.25
12905/02/2022The Land860DepositLand DepositThe LandReal Estate Investment22580
Transactions
Cell Formulas
RangeFormula
H2:H129H2=SUMIFS($C2:$C$332,$G2:G$332,$G2)+SUMIFS($J$328:$N$328,$J$327:$N$327,$G2)




Master Accounting.xlsb.xlsx
ABC
90Liquid Assets$ 14,531.00$ 10,694.79
91Cash$ -$ 2,776.42
92Debit$ 14,531.00$ 7,918.37
93BofA Checking$ 3,152.40$ 2,626.77
94BofA Savings$ 3,097.76$ 2,497.76
95EUCCU Checking$ 3,262.34$ 1,135.84
96EUCCU Savings$ 4,264.50$ 1,638.00
97EUCCU Visa$ 500.00
98Investment Assets$ 4.00
99Venmo$ 250.00$ 20.00
Totals Monthly
Cell Formulas
RangeFormula
B90:C90B90=SUM(B$91:B$92)
B92:C92B92=SUM(B$93:B$99)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B90:CA103Cell Value<0textNO
B90:CA103Cell Value>0textNO
B90:CA103Cell Value=0textNO
 
Upvote 0
Thanks for the sample data.
Assuming the table on sheet 'Transactions' is also called Transactions, try this.
A few results are different to your sample I believe due to you using the full 'Transactions' table but we only had a part of that table.

Dudetrek.xlsm
ABC
90Liquid Assets14,527.007,920.95
91Cash0.002,776.42
92Debit14,527.005,144.53
93BofA Checking3,152.402,626.77
94BofA Savings3,097.762,497.76
95EUCCU Checking3,262.34 
96EUCCU Savings4,264.50 
97EUCCU Visa500.00 
98Investment Assets  
99Venmo250.0020.00
Totals Monthly
Cell Formulas
RangeFormula
B90:C90B90=SUM(B$91:B$92)
B91,B93:B99B91=INDEX(FILTER(Transactions[Account Total],(Transactions[Account Name]=A91)*(TEXT(Transactions[Date],"mmyy")=TEXT(TODAY(),"mmyy")),""),1)
C91,C93:C99C91=INDEX(FILTER(Transactions[Account Total],(Transactions[Account Name]=A91)*(TEXT(Transactions[Date],"mmyy")=TEXT(EDATE(TODAY(),-1),"mmyy")),""),1)
B92:C92B92=SUM(B$93:B$99)
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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