Can someone help me write a simple macro that removes 5 blank spaces between each example on the Raw tab in my workbook. The Removed Spaces tab shows how the data should look after the spaces are removed. Any help with this would be great. Thanks
Can someone help me write a simple macro that removes 5 blank spaces between each example on the Raw tab in my workbook. The Removed Spaces tab shows how the data should look after the spaces are removed. Any help with this would be great. Thanks
Last edited by rhudgins; 10-12-2010 at 05:58 PM.
Here's a quick example of how to do this. I moved your Criteria label to column A and centered it across selection. This way it can be used in the code and it also looks more centered on your sheet.
One thing I'd like to point out:
- Are you sure you are going to want to delete 5 rows every time? If not, we could come up with a way to leave only two "spacer" rows between one Criteria and the next.
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
Thanks. Yes ,I would like to delete 5 rows everytime.
Eventually I will have hundreds of these examples on the spreadsheet so moving the Criteria label to column A for all of them will not make sense. Is there a way around this?
Yes, the code can be changed to:
Please Login or Register to view this content.
However, I don't see what the number of Criteria has to do with them being in Column A instead of Column E like you have them now. Did you realize that I was talking about the actual label that says "Criteria"?
This is perfect! Thanks for your help
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks