Retreiving Data when comparing against multiples

smk511

New Member
Joined
May 2, 2014
Messages
3
I have an excel document where I am trying to compare a few lists.

In one tab I have a list of customers who qualify for a discount. Most customers qualify for lots of different discounts so the customer ID is in the document multiple times.

In another tab I have a list of Orders from customers. Again, customers order multiple times so the customerID again appears multiple times.

At a baseline I am trying to say in the Orders tab...if a customerID on a specific row appears in the Discounts tab then return the discount they got on that order.

There are other criteria I need to check before looking to see if the customerID is in both tabs, so this will be a multiple condition formula, but the part of the formula that keeps breaking it is checking the CustomerID and I think it is because in the Discount tab the formula is struggling with the multiple entries of the customerID.

I have tried this with pretty much every formula combination I can think of…(if(and), sumifs, sumproduct, index(match(if)) and I keep running into road blocks.
Any ideas/thoughts would be much appreciated.

The formula I am most recently trying is:

=IFERROR(INDEX($N$2:$N$16,MATCH(1,IF($S2=0,IF('Special Discounts'!$A$2:$A$24='Sql Data'!$D2,1)),0)),0)

Where N contains the discount they were given, 'Special Discounts' A contains the customerIDs that qualify for the discount and 'SQL Data'D contains the customer who placed the order.

And I can't for the life of me figure out how to add my sample data...so help with that would also be appreciated. I am in Excel 2010
x
Thanks in advance for any support!

Shante
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,215,518
Messages
6,125,291
Members
449,218
Latest member
Excel Master

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