Google Script App - Copy & Paste Loop

MS93CP

New Member
Joined
Mar 30, 2017
Messages
11
I have a bunch of data in a Google Sheet and I’m trying to create a simple script that’ll loop and copy it over into the correct place in a second Google Sheet.

DM SAMPLE SHEET (SOURCE)
SM SAMPLE SHEET (DESTINATION)

Rules for copy and paste:


  1. Loop through each row in the source sheet.
    1. If the row is for a pick-up job (determined by time present in column D), then copy time from column L (Completed time) to SM's column Q (actual pick-up time), determining the row by matching the order number.
    2. If the row is for a delivery job (determined by time present in column E), then copy time from column L (Completed time) to SM's column S (actual delivery time), determining the row by matching the order number.

The script needs to be able to be manually run periodically to update the SM SAMPLE SHEET with all the times from the DM SAMPLE SHEET.



Removed link to DM sheet
 
Last edited by a moderator:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Can't really help with documents that can only be viewed.
 
Upvote 0
Can't really help with documents that can only be viewed.

Apologies! Wasn't sure what best-practice was; whether you would make a copy of the document or would want edit access! I've enabled edit access.
 
Upvote 0
I have removed the link for the DM sheet as it looks to have the phone numbers for your drivers.
If they are real phone numbers I would suggest that you remove them before supplying a new link
 
Upvote 0
Looks like it will need to be a copy and paste job - when I try adding code to your sheets I'm getting all sort of permission, security stuff.
 
Upvote 0
Looks like it will need to be a copy and paste job - when I try adding code to your sheets I'm getting all sort of permission, security stuff.

When I sign in using a different Gmail account it lets me go into the sheet and select Tools > Script Editor and add scripts and press save. What errors are you receiving?
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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