Sum + Xlookup issues!!!

MarkReddell

Board Regular
Joined
Sep 1, 2011
Messages
210
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hello XLers,

I'm having issues with combining the sum function with xlookup is this formula: = IF( AND( COUNTIFS( ContractsTable[@[Lead]:[Production]], BH$4)>0, [@[Dept'#]]=6), SUM( XLOOKUP([@Date], CommissionsTable[Date], XLOOKUP(BH$4,$AZ5:$BE5, CommissionsTable[[Lead]:[Production]],,-1),,-1)), "")

I need to lookup my salesman listed starting in Column "BH$4" (across row 4) in a list of salesman listed in: $AZ5:$BE5. This list is the work levels that I'm trying combine total commissions per salesman. The return commission levels are listed in: CommissionsTable[[LEAD]:[PRODUCTION}}. Which are 6 levels that are from 25%, 15%, 25%, 20%, 10%, & 5% totaling 100%. My problem with this formula is that its only returning the first match & not the sum across ALL 6 commission levels.

Please if there is any ideas I would be very thankful!!!








= IF( AND( COUNTIFS( ContractsTable[@[Lead]:[Production]], BH$4)>0, [@[Dept'#]]=6), SUM( XLOOKUP([@Date], CommissionsTable[Date], XLOOKUP(BH$4,$AZ5:$BE5, CommissionsTable[[Lead]:[Production]],,-1),,-1)), "")
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Xlookup is definitely not the correct function for what you are attempting to do, I would guess that you might need either sumif with offset or sum with filter but without a visual representation of your data and expected results (XL2BB please, not screen captures) there would be too much guesswork involved in trying to resolve this.
 
Upvote 0

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

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