adrienne0914
Board Regular
- Joined
- Mar 22, 2018
- Messages
- 73
- Office Version
- 365
- Platform
- Windows
Hi all,
I'm hoping you can help me out. I have a question about SUM INDEX MATCH for items in a row:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]PPTD[/TD]
[TD]PPTD[/TD]
[TD]PTD[/TD]
[TD]PTD[/TD]
[TD]PTD[/TD]
[TD][/TD]
[TD]PTD[/TD]
[TD]PPTD[/TD]
[/TR]
[TR]
[TD]Customers[/TD]
[TD]70[/TD]
[TD]81[/TD]
[TD]80[/TD]
[TD]94[/TD]
[TD]75[/TD]
[TD][/TD]
[TD]249[/TD]
[TD]151[/TD]
[/TR]
</tbody>[/TABLE]
The last two columns should total the others if there is a match to the column heading:
=SUM(INDEX($B2:$F2,MATCH(H$1,$B1:$F$1,0)))
Instead of returning the total for PTD, it just returns the first instance. What am I doing wrong?
I'm hoping you can help me out. I have a question about SUM INDEX MATCH for items in a row:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]PPTD[/TD]
[TD]PPTD[/TD]
[TD]PTD[/TD]
[TD]PTD[/TD]
[TD]PTD[/TD]
[TD][/TD]
[TD]PTD[/TD]
[TD]PPTD[/TD]
[/TR]
[TR]
[TD]Customers[/TD]
[TD]70[/TD]
[TD]81[/TD]
[TD]80[/TD]
[TD]94[/TD]
[TD]75[/TD]
[TD][/TD]
[TD]249[/TD]
[TD]151[/TD]
[/TR]
</tbody>[/TABLE]
The last two columns should total the others if there is a match to the column heading:
=SUM(INDEX($B2:$F2,MATCH(H$1,$B1:$F$1,0)))
Instead of returning the total for PTD, it just returns the first instance. What am I doing wrong?