hakunamatata167
New Member
- Joined
- May 11, 2017
- Messages
- 8
Hi All,
I have a large database which I am working on and one part I'm stuck on is merging rows to give one result.
i.e. here is some mock data:
[TABLE="width: 437"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Speciality[/TD]
[TD]Location[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]morning[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]afternoon[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]evening[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]morning[/TD]
[TD]TeamStark[/TD]
[TD]Long Island[/TD]
[TD]Iron Man[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]afternoon[/TD]
[TD]TeamStark[/TD]
[TD]Long Island[/TD]
[TD]Iron Man[/TD]
[/TR]
</tbody>[/TABLE]
And here is what I would like:
[TABLE="width: 477"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Speciality[/TD]
[TD]Location[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]Triple Session[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]All Day[/TD]
[TD]TeamStark[/TD]
[TD]Long Island[/TD]
[TD]Iron Man[/TD]
[/TR]
</tbody>[/TABLE]
As you can see, basically I need a way to merge cells and if they match a criteria in the time column, replace this with a summary term - for example morning+afternoon+evening would equal triple session; morning+afternoon would equal all day
Thanks for any help and ideas
I have a large database which I am working on and one part I'm stuck on is merging rows to give one result.
i.e. here is some mock data:
[TABLE="width: 437"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Speciality[/TD]
[TD]Location[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]morning[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]afternoon[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]evening[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]morning[/TD]
[TD]TeamStark[/TD]
[TD]Long Island[/TD]
[TD]Iron Man[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]afternoon[/TD]
[TD]TeamStark[/TD]
[TD]Long Island[/TD]
[TD]Iron Man[/TD]
[/TR]
</tbody>[/TABLE]
And here is what I would like:
[TABLE="width: 477"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Speciality[/TD]
[TD]Location[/TD]
[TD]Person[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]Triple Session[/TD]
[TD]TeamCap[/TD]
[TD]Brooklyn[/TD]
[TD]Captain America[/TD]
[/TR]
[TR]
[TD]15/04/18[/TD]
[TD]All Day[/TD]
[TD]TeamStark[/TD]
[TD]Long Island[/TD]
[TD]Iron Man[/TD]
[/TR]
</tbody>[/TABLE]
As you can see, basically I need a way to merge cells and if they match a criteria in the time column, replace this with a summary term - for example morning+afternoon+evening would equal triple session; morning+afternoon would equal all day
Thanks for any help and ideas