Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
Script to calculate a total and then merge cells into one in column 'c' if column 'a' has the same date (Using for timesheet)

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

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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)

enter image description here

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!