Macro Buttons to Copy Non-Blank Row(s) In & Out of Excel

Aderonin

New Member
Joined
Feb 24, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
So, it's not a huge thing but just trying to create a button that just grabs non-blank rows of data and throws it into your clipboard for pasting into another spreadsheet or somewhere else. You know pdfs and such don't always copy very well so the data doesn't go nicely into Excel. I'll just use a blank sheet as my base and have the button to move it around. Don't know the exact number of columns or rows when I do this. When I did my searching, I couldn't do find dynamic copying easily so I'm sure there's a way. Example (- is blank):

Stuff 8 15 26 48
-
MoreStuff 15 - 15
- - 26 37 Stuffed - 4

I went non-uniformly but ideally, it'll grab 3 rows that have data and every column that does have data. Most of the time, it'll be same number of columns but might as well make it cover to use whenever. I'll put the button on top which I know how to make and macro it when it's clicked. Now that I'm thinking about, there are times when I copy from things and then it decides to throw it into a single cell. While my first post was about extracting just one piece of info from it and it didn't matter, this would be about grab all the info I can. Maybe a first button to manipulate the data on the sheet to format and parse it out properly into different columns and delete blank rows. I guess use spaces as the separator since that will be the most common thing but I'm definitely afraid of times when it just decides to squish the data all into one word but I'll deal with that. The other button is the main one where I can copy the data present on the sheet and paste it where I may. That can just draw a box around them all or pick all cells with data, whichever is best/easiest.

This may have gotten more complicated than I originally anticipated. I'm just trying to get all of the things done in one fell swoop and have a sheet that will be the best to organize the data before moving it onto somewhere else. If you have any other thoughts, especially as you know how pasting into Excel can go, to make it easier to make it presentable and such, feel free to add it.

Thank you for your time and help.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
May be I can help you, you may share your data file and explain practically that you need.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,120
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