Column A = Date (so there could be multiple rows for the same day but different times) Column B = Time spent (number) Column C = Will be the total of all cells in column 'B' if has the same date in column 'A'
So I'm looking to automatically merge the cells in column C if the date is the same in column 'A' so I have one merged cell with the day total hours using a Google Apps script
Any help would be much appreciated
I do not recommend merging cells. It is doable, but you must use a script. Here is a solution with a simple formula:
=QUERY( {arrayformula(int(A2:A)),B2:B},"select Col1, sum(Col2) where Col2 is not null group by Col1 label Col1 'Date', sum(Col2) 'Total hours'",0)