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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Can't really help with documents that can only be viewed.
 
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,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

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