You can achieve it by using Office Scripts, which is an engine that allows you to use Typescript programming language within Excel, working similarly to the VBA for Excel in Desktop.
I can help you to build a script for moving your cells content as illustrated in the image. Before it, I have some questions about your process:
- Is your "Fruits" data located always at the same column? For example, will it always be allocated under Column A or Column D?
- In the column "Fruits", does it always have a same quantity of rows, or can it vary?
- Are the destination column headers (Fruits-1 and Fruits-2) part of the template, or do the automation have to include it as well?
Feel free to bring some additional context as well.
You can also check these articles for further reference on Office Scripts:
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.