I need to sum data for each department. This seems simple but my data's columns are not always in the same order. I'm sure there is a way to find the 'department column in an array then find the wages column and sum particular department names.
It just needs to work with dynamic data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Department[/TD]
[TD]Wages[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Smith, John[/TD]
[TD]Admin[/TD]
[TD]1000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Spalding, Sally[/TD]
[TD]Sales[/TD]
[TD]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Clooney, George[/TD]
[TD]Admin[/TD]
[TD]700[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sales[/TD]
[TD]800[/TD]
[/TR]
[TR]
[TD]Revere, Paul[/TD]
[TD]SAles[/TD]
[TD]300[/TD]
[TD][/TD]
[TD][/TD]
[TD]Admin[/TD]
[TD]1700[/TD]
[/TR]
</tbody>[/TABLE]
It just needs to work with dynamic data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Department[/TD]
[TD]Wages[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Smith, John[/TD]
[TD]Admin[/TD]
[TD]1000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Spalding, Sally[/TD]
[TD]Sales[/TD]
[TD]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Clooney, George[/TD]
[TD]Admin[/TD]
[TD]700[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sales[/TD]
[TD]800[/TD]
[/TR]
[TR]
[TD]Revere, Paul[/TD]
[TD]SAles[/TD]
[TD]300[/TD]
[TD][/TD]
[TD][/TD]
[TD]Admin[/TD]
[TD]1700[/TD]
[/TR]
</tbody>[/TABLE]