cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dashort
Helper I
Helper I

Copy from Excel and paste horizontally

Hi folks.  I'm looking reformat an Excel spreadsheet to basically group items in a horizontal entry instead of vertical.

 

I have a list of entries in a column, about 10 of them which describe a person.  Name, address, etc.  The data is produced through a SQL query and stored in Excel.  

I would like to reformat the data to have 10 columns of data, with each row containing the person's information.

 

As I understand it, I need to copy a range of cells and then write them to another worksheet.  What I can't do is have them written horizontally, instead of vertically.

 

Your help is greatly appreciated.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
CKN
Helper I
Helper I

Set the datatable up as a 1 row, 10 columns
Adjust the excel range from a1:j10 to a1:z10 (or some other column to finish that is outside the range of input data)
Adjust the loop 0 to 9 to be 0 to (number of columns input)-1. It was 9 which is a:j (10 columns) -1
If input is a1:z10, loop is 0 to 25 like this

CKN_0-1675116982776.png

 

View solution in original post

5 REPLIES 5
MichaelAnnis
Super User
Super User

Copy

in new tab

right click -> Paste Special -> Transpose -> Ok

 

If you still need to automate it, you should be able to use hot keys to do paste special transpose. I think {Menu} is the right click button in send keys and then hover your mouse over the transpose symbol to see what the hotkey is.

 

best of luck. 

----
If my post has answered your question, please thumbs up and mark this post as a solution.

I also offer paid consulting services. If you would like to discuss this option, please feel free to DM me and we can set up a time to join a Zoom call and fix any issues you are having.
CKN
Helper I
Helper I

you could try something like this

CKN_1-1675055907075.png

 

The datatable created is a 10x10

dashort
Helper I
Helper I

CKN thanks so much.  Is there a way for me to iterate through the entire resultset using this approach?  ie. additional records...

 

 

CKN
Helper I
Helper I

Set the datatable up as a 1 row, 10 columns
Adjust the excel range from a1:j10 to a1:z10 (or some other column to finish that is outside the range of input data)
Adjust the loop 0 to 9 to be 0 to (number of columns input)-1. It was 9 which is a:j (10 columns) -1
If input is a1:z10, loop is 0 to 25 like this

CKN_0-1675116982776.png

 

dashort
Helper I
Helper I

Thank you so much for taking the time to assist.  You're the best!

 

 

Helpful resources

Announcements

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Check Out This New Copilot Demo as Power Automate Week Continues

To help celebrate #PowerAutomate Product Week, check out this great Copilot demo by April Dunnam, as she shows us how generative AI is changing the game for how you can create applications and automation.Click HERE to find out more about April’s session “Power Platform + List Formatting Integrations Master Class” alongside Chris Kent, David Warner II, and Hugo Bernier at the Microsoft Power Platform Conference this October in Las Vegas! #MPPC23

Get Caught Up on Power Platform Connections!

Since January, we've been honored to present nearly 20 episodes of Power Platform Connections, a webcast highlighting some of our amazing community members, Power Platform news and blogs, and a lot of general fun from our hosts, Microsoft PM's Hugo Bernier and David Warner. Every episode is chock-full of informative interviews, engaging conversation--and what's new and important to know about every aspect of Microsoft Power Platform.     If you've missed an episode, it's time to get caught up. Check out the Community Connections & How-To Videos in the Gallery. Find out what's going on the Power Platform Community today! 

Welcome to Power Automate Week with April Dunnam!

Welcome to #PowerAutomate week! Hear from this week's host, Principal Power Platform Advocacy Team Lead, April Dunnam, as she offers a sneak peek into all the content we have planned for you this week, as we look forward to the Microsoft Power Platform Conference in Las Vegas. #MPPC23 Register Today - https://www.powerplatformconf.com

Users online (3,963)