You can achieve this using VBA to copy the data from Sheet23 and paste it as values with source formatting into the next available empty column in Sheet41. You can then use Task Scheduler (Windows) or Automator (Mac) to run the process at a specific time every day.
Here's the VBA code for copying and pasting the data:
- Press Alt + F11 to open the VBA editor.
- Click on "Insert" > "Module" to insert a new module.
- Paste the following code into the module:
Sub CopyPasteData()
Dim wsSource As Worksheet, wsDestination As Worksheet
Dim lastCol As Long
Dim rng As Range
Set wsSource = ThisWorkbook.Worksheets("Sheet23")
Set wsDestination = ThisWorkbook.Worksheets("Sheet41")
Set rng = wsSource.Range("L1:Q70")
lastCol = wsDestination.Cells(1, wsDestination.Columns.Count).End(xlToLeft).Column + 1
rng.Copy
wsDestination.Cells(1, lastCol).PasteSpecial Paste:=xlPasteValuesAndNumberFormats
wsDestination.Cells(1, lastCol).PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
rng.ClearContents
End Sub
- Close the VBA editor.
Now, you can manually run the CopyPasteData macro by pressing Alt + F8 and selecting it from the list. This will copy the data from Sheet23 and paste it as values with source formatting into the next available empty column in Sheet41. It will also clear the contents of the source range in Sheet23.
To run the macro automatically at a specific time every day, you can use Task Scheduler (Windows) or Automator (Mac) to open the Excel file and run the macro. Here are the guides for each platform:
Please note that you will need to adjust the steps in the guides to run your Excel file and the CopyPasteData macro instead of the examples provided.
Remember to save and backup your data before running the macro, as it will make changes to your worksheets that might be difficult to undo.