Jump to content
Macro Express Forums
njan1982

Split an array

Recommended Posts

I want to copy a column of excel and paste each cell values one by one below into another excel column where my cusror is,

ignoring blank cells. I need one by one. paste cell one value then down arrow then cell two value its important. Splitting the array into each cell value is tricky for me and later pasting one by one value

Please help

  • Like 1

Share this post


Link to post
Share on other sites

What about copying the whole column first manually and then running a macro to just remove blank cells?  That would be a good general-use macro.

If all of the values are unique or you don't care about retaining duplicates, you can also simply use the "Data -> Remove Duplicates" command in Excel. This would leave one blank cell though.

 

Share this post


Link to post
Share on other sites

John’s method is probably the way I’d go. This seems to work OK for me in ME Pro:

// Assumes the range of cells has been selected, either manually or with additional commands.
// These TextType commands are shown individually here but could probably be combined.
Text Type (Simulate Keystrokes): <F5> // KB shortcut for 'Go To'.
Delay: 0.1 seconds
Text Type (Simulate Keystrokes): <ALT>s // Special
Delay: 0.1 seconds
Text Type (Simulate Keystrokes): k // Blanks
Delay: 0.5 seconds
Text Type (Simulate Keystrokes): <ENTER> // Apply
Delay: 0.1 seconds
Text Type (Simulate Keystrokes): <CONTROL>- // Delete rows
Delay: 0.1 seconds
Text Type (Simulate Keystrokes): <ENTER> // Apply
Delay: 0.1 seconds
// The compacted range can now be selected then copeid or moved to the new coulumn, manually or with additional commands.

 

Alternatively you could try the formula I found here:

https://www.myonlinetraininghub.com/excel-remove-blank-cells-from-a-range

Terry, UK

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×