Help with Index and multiple matches that include sum

usnapoleon

Board Regular
Joined
May 22, 2014
Messages
110
Office Version
  1. 365
Platform
  1. Windows
Thank you for your help. I thought I had this figured out and I was very excited, but then I saw that the number returned by my formula did not sum up multiple instances of a match.

I have 2 tabs on a spreadsheet. 1 is raw data, and the other extrapolates specific information from it. I will first show the raw data, then the cells I'm formulating in

Raw data, where we want $$ totals from column M, after running matches with columns H, W, and Q:
3.18 NEW spreadsheet WIP.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
7LedgerBUOpUnitDeptAccountAccount DescrJournal IDJournal DateTrans CurTrans AmtBase CurBase AmtUSD AmtYearPdPosted DateLine DescrEIDSource CodeSource DescrJournal LineJournal DescrJournal Line Ref
8ACTUALSE131134K930410134111Credit Card ReceivablesF1510804761/3/2024USD4.50USD4.504.502024101/04/2024DISCOVERMAESTROF15FDR Squirrel327MP 0282
9ACTUALSE131134K930281601101HospitalityF1510804761/3/2024USD24.24USD24.2424.242024101/04/2024HOSP 0281MAESTROF15FDR Squirrel328PC 0281
10ACTUALSE131134K930410134111Credit Card ReceivablesF1510804761/3/2024USD95.57USD95.5795.572024101/04/2024MASTERCARDMAESTROF15FDR Squirrel329TC 0131
11ACTUALSE131134K930410134111Credit Card ReceivablesF1510804761/3/2024USD47.41USD47.4147.412024101/04/2024MASTERCARDMAESTROF15FDR Squirrel330REST 0250
12ACTUALSE131134K930410134111Credit Card ReceivablesF1510804761/3/2024USD19.40USD19.4019.402024101/04/2024MASTERCARDMAESTROF15FDR Squirrel331REST 0250
Drillbit



Here is the spreadsheet I'm trying to feed into
3.18 NEW spreadsheet WIP.xlsx
ABCDEFGHIJKLMNOPQRSTU
1Enter Run Date as MM-DD-YYYY and then Refresh All from Data tab =>1/3/2024◄ Auto, don’t touchA u d i t o r :a balance check between squirrel payments and revenue??? Input one
2
3JC Pro Shop Revenue (G1)Theater Breakout Worksheet (TH)Auditors Daily Credit Card ReportDepartment Identification Data
4Report TotalAdjustmentsReport TotalOUTLET from POS systemsMASTERCARDVISAAMEXDISCOVER Totals
5Member Account-The Addams Family-Canyon Grille47.41-REST 0250
6Cash-Welkome Home-Canyon Grille Bar-CG Bar was removed as an outlet
7Mastercard--Marketplace-MP 0282
8VisaWonderettes-Pizza Hut-PC 0281
9American Express-Spamalot-Boulder Springs-PB 0220
10Discover-Elf-Mountain Springs-PB 0280
11Personal CheckBodyguard-The Shop-GS 0400
12Room Charge-Theater Concessions-TC 0131
13Rain Check (JC)-Beatles - Hard Days Night-Theater-
1
Cell Formulas
RangeFormula
K5K5=IFERROR(INDEX(Drillbit!M:M,MATCH(1,(Drillbit!H:H='1'!E1)*(Drillbit!W:W='1'!R5)*(Drillbit!Q:Q='1'!K4),0)),0)
D5,D12,D9:D10D5=SUM(B5:C5)
D6D6=SUM(B6:C6)+SUM(B11:C11)
D7D7=SUM(B7:C8)
H5:H11,H13H5=SUM(G5:G5)
D13D13=SUM(B13:C15)
O5:O13O5=L5+M5+N5


The formula is in K5, but here it is raw: =IFERROR(INDEX(Drillbit!M:M,MATCH(1,(Drillbit!H:H='1'!E1)*(Drillbit!W:W='1'!R5)*(Drillbit!Q:Q='1'!K4),0)),0)

That Raw Data tab only has 1 day in there so far, just for testing, 1/3/2024, but it is meant to have a whole month in there. For that reason, we first match the date, then we match the outlet's code, then we match the card type. As you can see in the raw data, there are 2 inputted numbers for MASTERCARD, from department REST 0250. Whether it has 2, or 5, I want it to combine them.

If there is a better formula, I am happy to learn it. I really thought I nailed it... kicking myself. Thank you in advance!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Try in K5
Excel Formula:
=SUMIFS(Drillbit!M:M,Drillbit!H:H,$E$1,Drillbit!W:W,$R5,Drillbit!Q:Q,K$4)
 
Upvote 0
Solution
Try in K5
Excel Formula:
=SUMIFS(Drillbit!M:M,Drillbit!H:H,$E$1,Drillbit!W:W,$R5,Drillbit!Q:Q,K$4)
Dangit!! There was a better way! Thank you very much! I threw in a sum, and didnt think of sumif. I am surprised we ditched the index. It's been a while since I did any formulating, I'm having trouble remembering all the stuff. Thank you again.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,120
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