Jump to content
Macro Express Forums

Split an array


njan1982

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
Link to comment
Share on other sites

  • 1 year later...

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.

 

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...