Jun 06 2023 12:53 PM
I have 100 toys, and I would like to get the total profit for each color of toy, and the average profit. 1 column for each toy, 100 columns. In between each toy column will be random various text, including the same words and numbers as are in the toy columns. In the example you see here, the words "Red" and "Blue" appear inbetween the toy columns, those words and columns should be not be included in the totals and averages. I am only interested in every other column. thank you.
Jun 06 2023 01:24 PM
=SUM(IF(($A$2:$GS$2="red")*(MOD(COLUMN(A:GS),2)=0),$A$3:$GS$3))
=AVERAGE(IF(($A$2:$GS$2="red")*(MOD(COLUMN(A:GS),2)=0),$A$3:$GS$3))
You can try these formulas. Enter the formulas with ctrl+shift+enter if you don't work with Office 365 or Excel 2021. For blue you can replace "red" by "blue" in the formula.
Jun 06 2023 02:43 PM
Jun 06 2023 08:04 PM
Jun 07 2023 04:45 AM
=AVERAGE(IF((MOD(COLUMN(T:SU),5)=0)*(Q21:SR21="red"),T3:SU3))
=SUM(IF((MOD(COLUMN(T:SU),5)=0)*(Q21:SR21="red"),T3:SU3))
You can try these formulas. Enter the formulas with ctrl+shift+enter if you don't work with Office 365 or Excel 2021. For blue you can replace "red" by "blue" in the formula.