is code available to do the equivalent of hitting the "delete" key...

sadams1

Board Regular
Joined
Aug 19, 2006
Messages
219
I have an array that is a mix of cells with printing & non printing characters. I'd like the cells that appear blank or empty to be returned to the equivalent of hitting the "delete" key. I've used the "clean", "trim" functions but the cells still seem to have something remaining. Manually hitting the delete key solves the problem but I'd like to see if code could be used to do the same.
 
last thing...promise! have noticed this runs very slowly as ranges with 1,000's of rows are selected. I break the routine by hitting "escape" & looking at the "debug"....instead of the code break being in the macro, it's breaking a completely different macro (!?) These are completely independent of each other so not sure what to make of this but my guess is that is has something to do with the sluggishness?
Attached is what I'm seeing when running your code (1st screenshot) then after breaking code (2nd screenshot)
 

Attachments

  • Untitledxxx.png
    Untitledxxx.png
    30.6 KB · Views: 3
  • x.png
    x.png
    21.3 KB · Views: 3
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,215,877
Messages
6,127,500
Members
449,385
Latest member
KMGLarson

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