Forum Discussion
PeanutButterExcelTime
Dec 29, 2022Copper Contributor
Guidance on a possible formula
Hello all, I am fairly new to excel and tried a lot of searches in google but was not successful. Always found a way to do half of what I needed but never the whole thing. Maybe one of you can he...
- Dec 29, 2022
I'd add a helper column to the table. Name it Include and enter the formula
=COUNTIFS([Order ID],[@[Order ID]],[Product Name],"Pizza*",[Expires in days],30)*COUNTIFS([Order ID],[@[Order ID]],[Product Name],"Spice 2")
in row 2. This should propagate to the other rows automatically. The formula will return 1 for orders that meet the criteria, and 0 for the rest.
The fill order value of the orders meeting the criteria is
=SUMIFS(Orders[Price],Orders[Include],1)
where Orders is the name of the table.
See the attached sample workbook.
HansVogelaar
Dec 29, 2022MVP
I'd add a helper column to the table. Name it Include and enter the formula
=COUNTIFS([Order ID],[@[Order ID]],[Product Name],"Pizza*",[Expires in days],30)*COUNTIFS([Order ID],[@[Order ID]],[Product Name],"Spice 2")
in row 2. This should propagate to the other rows automatically. The formula will return 1 for orders that meet the criteria, and 0 for the rest.
The fill order value of the orders meeting the criteria is
=SUMIFS(Orders[Price],Orders[Include],1)
where Orders is the name of the table.
See the attached sample workbook.
PeanutButterExcelTime
Dec 30, 2022Copper Contributor