Hello Everyone,
I am not sure if something like this is possible to easily achieve, but I am looking for a macro that can do the following...
Manually
1.) Select cells with data that you want to remove a specified numbers of spaces from the beginning or end of.
2.) Click on tool button that has the following macro assigned to it.
Here is where macro will start...
3.) A dialog box pops up with the phrase "Enter Number Of Spaces To Remove From Beginning" and it has a blank field to type a number into.
If you type a number into the field and hit enter it will remove that many spaces from the beginning of the selected cells text.
If you leave field blank and hit enter it does not delete any spaces from beginning of the selected cells text.
4.) Next a dialog box pops up with the phrase "Enter Number Of Spaces To Remove From End" and it has a blank field to type a number into.
If you type a number into the field and hit enter it will remove that many spaces from the end of the selected cells text.
If you leave field blank and hit enter it does not delete any spaces from the end of the selected Cells text.
So this one tool basically will allow you to delete a specified number of characters (letters or numbers) from the beginning or ends of all the cells you select that contain text.
(It might be nice to create the macro with the ability for someone to be able to remove the "beginning" or "end" coding if they just want a tool to do one specifically, instead of having them both in one tool, if it can easily be done.)
It is not a tool that will be used constantly, but I myself would find it to be a useful tool in the toolbox, and I have seen many others ask for the ability to achieve similar results, but I feel this one created how I explain above, covers all the bases and can be helpful to many (hopefully).
Thank You again for anyone who reads this and is willing to give it a shot.
Any questions please let me know, and I will try to explain better.
I am not sure if something like this is possible to easily achieve, but I am looking for a macro that can do the following...
Manually
1.) Select cells with data that you want to remove a specified numbers of spaces from the beginning or end of.
2.) Click on tool button that has the following macro assigned to it.
Here is where macro will start...
3.) A dialog box pops up with the phrase "Enter Number Of Spaces To Remove From Beginning" and it has a blank field to type a number into.
If you type a number into the field and hit enter it will remove that many spaces from the beginning of the selected cells text.
If you leave field blank and hit enter it does not delete any spaces from beginning of the selected cells text.
4.) Next a dialog box pops up with the phrase "Enter Number Of Spaces To Remove From End" and it has a blank field to type a number into.
If you type a number into the field and hit enter it will remove that many spaces from the end of the selected cells text.
If you leave field blank and hit enter it does not delete any spaces from the end of the selected Cells text.
So this one tool basically will allow you to delete a specified number of characters (letters or numbers) from the beginning or ends of all the cells you select that contain text.
(It might be nice to create the macro with the ability for someone to be able to remove the "beginning" or "end" coding if they just want a tool to do one specifically, instead of having them both in one tool, if it can easily be done.)
It is not a tool that will be used constantly, but I myself would find it to be a useful tool in the toolbox, and I have seen many others ask for the ability to achieve similar results, but I feel this one created how I explain above, covers all the bases and can be helpful to many (hopefully).
Thank You again for anyone who reads this and is willing to give it a shot.
Any questions please let me know, and I will try to explain better.