danhodges99
New Member
- Joined
- Apr 22, 2009
- Messages
- 12
Hi – I hope you can help, this is proving beyond me…
I have two tables. The first contains the data, in this case a list of activities carried out in a personal fitness log and the date of each:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Activity[/TD]
[/TR]
[TR]
[TD]01/08/2016[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]Running[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]01/08/2016[/TD]
[TD]Cycling[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]Rowing[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]Gym[/TD]
[/TR]
[TR]
[TD]05/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Gym[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Cycling[/TD]
[/TR]
[TR]
[TD]09/08/2016[/TD]
[TD]Rowing[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]Rowing[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]Running[/TD]
[/TR]
</tbody>[/TABLE]
The second table is meant to be a dashboard calendar summary of the number of each activity on each date, and should look like this:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Rowing[/TD]
[TD]Running[/TD]
[TD]Cycling[/TD]
[TD]Gym[/TD]
[/TR]
[TR]
[TD]01/08/2016[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]03/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]04/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]05/08/2016[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]06/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]08/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]09/08/2016[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
I’ve almost managed it using INDEX & MATCH. However, when a day has multiple activities, the calendar view only captures the first activity on each day and ignores the rest – leaving my figures inaccurate.
Any help here is greatly appreciated - thanks.
I have two tables. The first contains the data, in this case a list of activities carried out in a personal fitness log and the date of each:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Activity[/TD]
[/TR]
[TR]
[TD]01/08/2016[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]Running[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]01/08/2016[/TD]
[TD]Cycling[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]Rowing[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]Gym[/TD]
[/TR]
[TR]
[TD]05/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Gym[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]Cycling[/TD]
[/TR]
[TR]
[TD]09/08/2016[/TD]
[TD]Rowing[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]Rowing[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]Running[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]Running[/TD]
[/TR]
</tbody>[/TABLE]
The second table is meant to be a dashboard calendar summary of the number of each activity on each date, and should look like this:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Rowing[/TD]
[TD]Running[/TD]
[TD]Cycling[/TD]
[TD]Gym[/TD]
[/TR]
[TR]
[TD]01/08/2016[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]02/08/2016[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]03/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]04/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]05/08/2016[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]06/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]07/08/2016[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]08/08/2016[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]09/08/2016[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]10/08/2016[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
I’ve almost managed it using INDEX & MATCH. However, when a day has multiple activities, the calendar view only captures the first activity on each day and ignores the rest – leaving my figures inaccurate.
Any help here is greatly appreciated - thanks.