Forum Discussion
User537843
Jun 06, 2023Copper Contributor
Column skipping
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, in...
OliverScheurich
Jun 06, 2023Gold Contributor
=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.
- User537843Jun 07, 2023Copper Contributor
- OliverScheurichJun 07, 2023Gold Contributor
=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.
- User537843Jun 07, 2023Copper ContributorThank you, this worked well. I have changed my workbook, the goal is the same, but the cells I use are different. I spent 20 minutes trying to adapt your formula to the new workbook,but I failed. Could you show me how to adapt it? I will post the new screenshot.