Excel formula: how to sum multiple columns on a single criteria

TT123

New Member
Joined
May 24, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

Just wondering if anyone could give me a hand with this excel formula please?

I’m trying to pick up the Total Team A balance (TeamA_red + TeamA_yellow + TeamA_pink), the expected total is $960. I’ll need a wildcard to pick up any columns with a “TeamA” description.

I’ve tried using index match but it would only return the total of TeamA_red column ($60), unable to include TeamA_yellow and TeamA_pink.

Sum(Index($A:$F,0, Match(“*TeamA*”,$B1:$F1,0)))

Any recommendation on how to get around this please?

Thanks.


ABCDEF
Row 1TeamA_redTeamB_whiteTeamA_yellowTeamC_greenTeamA_pinkTotal Team_A$960
Row 2Apr-2410205040100
Row 3Apr-2420200100400200
Row 4Apr-243020001504000300
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try:
Book1
ABCDEFGHI
1TeamA_redTeamB_whiteTeamA_yellowTeamC_greenTeamA_pinkTotal Team_A$960
224-Apr10205040100
324-Apr20200100400200
424-Apr3020001504000300
Sheet3
Cell Formulas
RangeFormula
I1I1=SUM(IF(ISNUMBER(SEARCH("TeamA",B1:F1)),B2:F4,0))
 
Upvote 0
Or
AutoTraining.xlsm
ABCDEFGHI
1TeamA_redTeamB_whiteTeamA_yellowTeamC_greenTeamA_pinkTotal Team_A$ 960
2Apr-2410205040100
3Apr-2420200100400200
4Apr-243020001504000300
5
6
7
8
Sheet6
Cell Formulas
RangeFormula
I1I1=SUM(FILTER(B1:F10,LEFT(B$1:F$1,5)="TeamA"))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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