The TASK_COPY function copies data and formatting from a source range to a destination range, possibly across different sheets in the same spreadsheet. It preserves cell values, formulas, and formatting while allowing you to replicate content between different parts of your spreadsheet.
=TASK_COPY(header, source_range, destination_range, [source_sheet], [destination_sheet])
Parameter | Data Type | Required | Description |
---|---|---|---|
header | string | Yes | Column header for the task template |
source_range | string | Yes | The range to copy from in the source sheet (e.g., "A1:B10") |
destination_range | string | Yes | The range to copy to in the destination sheet (e.g., "C1:D10") |
source_sheet | string | No | The name of the source sheet (e.g., "Sheet1"). If not specified, uses the active sheet |
destination_sheet | string | No | The name of the destination sheet (e.g., "Sheet2"). If not specified, uses the active sheet |
When the destination range has different dimensions than the source range, TASK_COPY handles this by repeating the source content to fill the destination. For example:
You can copy between different sheets in the same spreadsheet by specifying the source_sheet
and destination_sheet
parameters. This allows you to maintain consistent data and formatting across multiple sheets.
TASK_COPY preserves formulas from the source range. When a formula is copied, it maintains its relative references, similar to how Google Sheets' native copy-paste functionality works.
All formatting attributes from the source range are applied to the destination range, including:
=TASK_COPY("Header", "A1:B10", "D1:E10")
=TASK_COPY("Header", "A1:C5", "A1:C5", "Data", "Summary")
=TASK_COPY("Header", "A1:A1", "B1:B10")
=TASK_COPY("Header", "TemplateSheet!A1:E10", "A1:E10", "TemplateSheet", "NewData")
=TASK_COPY("Header", "Data!B5:D15", "F10:H20", "Data", "Summary")
Cause: The function received invalid input or no input at all.
Solution: Make sure all required parameters (header, source_range, destination_range) are provided and properly formatted.
Cause: The JSON string generated by TASK_COPY has been modified or corrupted.
Solution: Don't manually edit the JSON string in the cell. Re-create the TASK_COPY formula from scratch.
Cause: The function parameter in the JSON doesn't match "TASK_COPY".
Solution: Ensure you're using TASKCOPY correctly and haven't mixed it with another TASK* function.
Cause: The source_range or destination_range parameters are missing or empty.
Solution: Provide both source_range and destination_range parameters with valid A1 notation.
Cause: The specified source sheet doesn't exist in the spreadsheet.
Solution: Check the spelling of the source_sheet parameter and make sure the sheet exists.
Cause: The specified destination sheet doesn't exist in the spreadsheet.
Solution: Check the spelling of the destination_sheet parameter and make sure the sheet exists.
Cause: One or both of the specified ranges are invalid A1 notation.
Solution: Ensure that both source_range and destination_range use valid A1 notation (e.g., "A1:B10").
Cause: There was an issue copying the formatting from the source to the destination.
Solution: The values and formulas will still be copied, but you may need to manually fix some formatting.
TASK_COPY works similarly to copy-paste but can be saved as a reusable formula, automated as part of a workflow, and handles different-sized ranges by repeating content as needed.
Yes, TASK_COPY preserves formulas and copies them to the destination range. Relative references in formulas will adjust based on the new location, just like normal copy-paste.
No, TASK_COPY only works within the same spreadsheet. You can copy between different sheets, but not between different spreadsheet files.
Yes, any data in the destination range will be overwritten when you run TASK_COPY. Be careful when copying to ranges that contain important information.
TASK_COPY will copy the values and formatting of merged cells, but it won't merge cells in the destination range. You may need to manually merge cells in the destination if needed.
TASK_COPY will work as long as you have edit permission for both the source and destination ranges. If either range is protected and you don't have permission, the operation will fail.
If the destination range is larger than the source range, TASK_COPY will repeat the source content to fill the destination. If the destination is smaller, only a portion of the source content will be copied.
Yes, TASK_COPY copies all cells in the specified ranges, regardless of whether they're hidden or not.
No, TASK_COPY always copies both values and formulas. If you only want values, you would need to manually paste as values after using TASK_COPY.
No, TASK_COPY doesn't copy cell comments or notes. It only copies values, formulas, and formatting.
Yes, you can include TASK_COPY in automated workflows, but remember that the "Run" button in the sidebar must be clicked to execute the copy operation.
After clicking "Run" in the sidebar, a success message will appear indicating that data has been copied from the source range to the destination range.
1 week ago