Index, SumIf?, Matching

usnapoleon

Board Regular
Joined
May 22, 2014
Messages
110
Office Version
  1. 365
Platform
  1. Windows
Hello,
I feel I'm going to kick myself when you post a simple fix to my formula...
I have an existing formula that gives me the Discount total for 1 outlet... but I want to modify it to give me total Discounts. I'll show you:

Audit Breck Template REV 05.2024.xlsx
MNOPQ
25Discounts & Comps-30.8Variance Check
1
Cell Formulas
RangeFormula
P25P25=IFERROR(INDEX($A$40:$Z$43,MATCH("Trails' End Lounge",$A$40:$A$43,0),MATCH(N25,$A$40:$Z$40,0)),0)


It's pulling from this:

Audit Breck Template REV 05.2024.xlsx
ABCDEFGHIJKLMN
37Sales Summary
38Display By Location
39Filtered By Location: The Market, Trails' End Lounge
40Sales Summary Displayed by LocationGross SalesItemsService ChargesRefundsDiscounts & CompsNet SalesGift Card SalesTaxTipPartial RefundsTotal CollectedFeesNet Total
41The Market$126.00$126.00$0.00($8.00)($0.80)$117.20$0.00$10.41$0.00$0.00$127.61($2.55)$125.06
42Trails' End Lounge$591.00$591.00$0.00$0.00($30.80)$560.20$0.00$49.72$77.49$0.00$687.41($12.16)$675.25
43
1


As per the formula, its correctly grabbing the 'Trails' End Lounge' number, but I dont want it to be so specific. I want it to grab any numbers under that Discounts & Comps column.

Just as an FYI, that formula is as complicated as it is to account for the future possibility that columns may be added which could shift data over. If that ever happens, the formula will still supply the proper numbers, whether the Discounts & Comps were column F (as it currently is) or column J (as an example).
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Do you mean something like this?

Excel Formula:
=SUM(FILTER(B41:N42,B40:N40=N25))
 
Upvote 0
Solution
See... told you.. I feel stupid, hahaha. Thank you!!!!!!!
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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