Total a column and repeat headings

marcidee

Board Regular
Joined
May 23, 2016
Messages
184
Office Version
  1. 2019
Please can someone help me with a script - I have a sheet that has a blank row every time a new name appears in column A

What i would like is to:

Place a total of the figures in column G - total in column F (last row)
Repeat the headings from row 1 on each blank line

Example of end result below

Thank you for your help


NameTimesheetP/E DateCompanyTime workedPay RateTotal Pay
0
Abimbola Dunsin (Dunsin) B1Thu 08 Aug 2019Peter Howes0.759.006.75
Abimbola Dunsin (Dunsin) B1Fri 09 Aug 2019Peter Howes0.59.004.5
Abimbola Dunsin (Dunsin) B1Sat 10 Aug 2019Phillip Mercer0.259.002.2513.5
NameTimesheetP/E DateCompanyTime workedPay RateTotal Pay
Afaque Solangi1Mon 12 Aug 2019Mohsen Taheri79.0063
Afaque Solangi1Tue 13 Aug 2019Mohsen Taheri79.0063
Afaque Solangi1Wed 14 Aug 2019Mohsen Taheri79.0063189
NameTimesheetP/E DateCompanyTime workedPay RateTotal Pay
Amalia Gatou B1Thu 15 Aug 2019Amanda King19.009
Amalia Gatou B1Fri 16 Aug 2019Amanda King0.259.002.25
Amalia Gatou B1Sat 17 Aug 2019Amanda King0.259.002.2513.5

<tbody>
</tbody>

I had posted this question on another forum however I did not find a solution - the link to this question is below:

https://www.ozgrid.com/forum/forum/h...es-in-column-a

The first part of the link is irrelevant as I have been fortunate to be given the solution in this forum by -'fluff' however I am looking for a solution to this question as I require both methods
 
Last edited by a moderator:
Unfortunately that didn't work either - it's inserting 3 lines and no totals or headings

NameTimesheetP/E DateClientTime WorkedPay RateTotal Pay0
NameTimesheetP/E DateClientTime WorkedPay RateTotal Pay
Afaque Solangi1##########Mohsen Taheri79.0063.00
Afaque Solangi1##########Mohsen Taheri79.0063.00
Afaque Solangi1Fri 09 Aug 2019Mohsen Taheri79.0063.00
Afaque Solangi1Fri 09 Aug 2019Samer Aboul-Hosn0.759.006.75
Afaque Solangi1Fri 09 Aug 2019Samer Aboul-Hosn19.009.00
Afaque Solangi1Fri 09 Aug 2019Samer Aboul-Hosn19.009.00
Amalia Gatou B1##########Amanda King19.009.00
Amalia Gatou B1##########Amanda King0.259.002.25
Amalia Gatou B1##########Amanda King0.59.004.50

<colgroup><col><col><col span="2"><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I think I may have found the problem - my later versions contain a formula - I will try again later (as I am out for while) with your code that worked last night and fingers crossed that will sort it. I will confirm later - thank you
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top