Forum Discussion
fran-d-31250
Apr 05, 2023Copper Contributor
Need help with formula for combining SUMIFS with IF from a dropdown list
I am building a sales dashboard that summarises sales by month and by product. I have SUMIFS functions that sum all product sales based on month which works fine. I am now trying to incorporate a dro...
NikolinoDE
Apr 05, 2023Platinum Contributor
Alternatively, if I may add, you can use a nested IF function to achieve this.
Here is an example formula (as far as I understand) that you can adapt to your needs:
=IF(Dropdown="All Products", SUMIFS(Sales,Month,"January"), IF(Dropdown="Product A", SUMIFS(Sales,Month,"January",Product,"A"), SUMIFS(Sales,Month,"January",Product,"B")))
This formula checks the value of the Dropdown cell and sums the sales for all products, Product A or Product B based on the selected value.
You can replace Sales, Month, January, and Product with the appropriate cell ranges and values for your data.