Calculating Totals By Quarter/Employees

Casp

New Member
Joined
Jul 24, 2021
Messages
16
Office Version
  1. 2019
Platform
  1. Windows
Hello,

The formula:
Excel Formula:
=IFS(U1=1,SUMIFS(sold,solddates,">"&W1,solddates,"<="&X1,employee,employeeselect))

- Is being used to calculate sales by quarter and employee when selecting a radio button.
- W1 and X1 have the start/end date range for said quarter.
- When selecting a specific employee from a dropdown list, the sum result is correct and works as expected.
- In the same list, the top option is "All Employees".

Question:
How can I add onto this formula to see the total sold for that quarter if the option "All Employees" is selected in the dropdown list?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I would add an if test and use one sumifs without employee if 'all' was selected and the one you have if a particular employee was selected.
 
Upvote 0
I would add an if test and use one sumifs without employee if 'all' was selected and the one you have if a particular employee was selected.

Is this what you mean? U1=1 is being used to determine the quarters so not sure my syntax is lining up to get the result.
Excel Formula:
=IF(U1=1,SUMIFS(sold,solddates,">"&W1,solddates,"<="&X1),SUMIFS(sold,solddates,">"&W1,solddates,"<="&X1,employee,employeeselect))
 
Upvote 0
Is there anyone who can shed some light on this? Thanks!
 
Upvote 0
Try this

Excel Formula:
=IFS(U1=1,SUMIFS(sold,solddates,">"&W1,solddates,"<="&X1,employee,IF(employeeselect="All Employees","?*",employeeselect)))
 
Upvote 0
Hi Peter, thank you for the formula. I was able to figure out the formula below to get the result I needed with some minor changes. Appreciate your help.
Excel Formula:
=IFS(U1=1,SUMIFS(sold,department,"*",employee,IF(employeeselect="All Employees","*",employeeselect),solddates,">"&W1,solddates,"<="&X1)
 
Upvote 0
Solution
Glad you have it resolved. Thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,777
Members
449,187
Latest member
hermansoa

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