Hi guys,
I am working on a project at the moment which requires information from 2 different sources to be consolidated into just one row with the title.
To give an example, I have two football teams, team 1 & 2 (because I'm feeling creative you see). If I am tracking their progress monthly and I end up with two tables, each with 3 fields, to track which teams they played and the goals scored, I would get something like the following:
[TABLE="width: 411"]
<TBODY>[TR]
[TD]Team 1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 2</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Team Played</SPAN>
[/TD]
[TD="align: right"]Goals Scored</SPAN>
[/TD]
[TD][/TD]
[TD]Team Played</SPAN>
[/TD]
[TD="align: right"]Goals Scored</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 3</SPAN>
[/TD]
[TD="align: right"]2</SPAN>
[/TD]
[TD][/TD]
[TD]Team 3</SPAN>
[/TD]
[TD="align: right"]1</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 4</SPAN>
[/TD]
[TD="align: right"]1</SPAN>
[/TD]
[TD][/TD]
[TD]Team 7</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 5</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[TD][/TD]
[TD]Team 8</SPAN>
[/TD]
[TD="align: right"]4</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 6</SPAN>
[/TD]
[TD="align: right"]3</SPAN>
[/TD]
[TD][/TD]
[TD]Team 4</SPAN>
[/TD]
[TD="align: right"]1</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
If I then want to make a list to know how many goals the opposing teams (3-8) have conceded, regardless of who they were against, what would be the best way to do this automatically, preferably in VBA?
I need these to feed in to a different sheet to show how many goals each team have conceded, but I am struggling when 1 team has been played by both Teams 1 & 2.
I am hoping to end up with something like this, only automatic as the number of 'Teams' I am actually using is far far higher.
[TABLE="width: 195"]
<TBODY>[TR]
[TD]Team Name</SPAN>
[/TD]
[TD="align: right"]Goals Conceded</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 3</SPAN>
[/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 4</SPAN>
[/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 5</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 6</SPAN>
[/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 7</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 8</SPAN>
[/TD]
[TD="align: right"]4</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
The actual project I am working on has nothing to do with football but it is the same basic thing I am trying to achieve, so if someone could help with this I will hopefully be able to apply the lessons learnt here to my own problem as a resolution.
Thanks in advance!
I am working on a project at the moment which requires information from 2 different sources to be consolidated into just one row with the title.
To give an example, I have two football teams, team 1 & 2 (because I'm feeling creative you see). If I am tracking their progress monthly and I end up with two tables, each with 3 fields, to track which teams they played and the goals scored, I would get something like the following:
[TABLE="width: 411"]
<TBODY>[TR]
[TD]Team 1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Team 2</SPAN>
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Team Played</SPAN>
[/TD]
[TD="align: right"]Goals Scored</SPAN>
[/TD]
[TD][/TD]
[TD]Team Played</SPAN>
[/TD]
[TD="align: right"]Goals Scored</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 3</SPAN>
[/TD]
[TD="align: right"]2</SPAN>
[/TD]
[TD][/TD]
[TD]Team 3</SPAN>
[/TD]
[TD="align: right"]1</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 4</SPAN>
[/TD]
[TD="align: right"]1</SPAN>
[/TD]
[TD][/TD]
[TD]Team 7</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 5</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[TD][/TD]
[TD]Team 8</SPAN>
[/TD]
[TD="align: right"]4</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 6</SPAN>
[/TD]
[TD="align: right"]3</SPAN>
[/TD]
[TD][/TD]
[TD]Team 4</SPAN>
[/TD]
[TD="align: right"]1</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
If I then want to make a list to know how many goals the opposing teams (3-8) have conceded, regardless of who they were against, what would be the best way to do this automatically, preferably in VBA?
I need these to feed in to a different sheet to show how many goals each team have conceded, but I am struggling when 1 team has been played by both Teams 1 & 2.
I am hoping to end up with something like this, only automatic as the number of 'Teams' I am actually using is far far higher.
[TABLE="width: 195"]
<TBODY>[TR]
[TD]Team Name</SPAN>
[/TD]
[TD="align: right"]Goals Conceded</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 3</SPAN>
[/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 4</SPAN>
[/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 5</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 6</SPAN>
[/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 7</SPAN>
[/TD]
[TD="align: right"]0</SPAN>
[/TD]
[/TR]
[TR]
[TD]Team 8</SPAN>
[/TD]
[TD="align: right"]4</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
The actual project I am working on has nothing to do with football but it is the same basic thing I am trying to achieve, so if someone could help with this I will hopefully be able to apply the lessons learnt here to my own problem as a resolution.
Thanks in advance!