Hello, I have a worksheet that I am having users paste data in to. When they do certain cells can have data that is very wide. I don't want to use Wrap Text because the amount of data is large and I need to retain the cell width and height as I have them set.
I would like to use VBA to check a cell length, when the data is pasted in by the user, and if it exceeds a certain length then the formatting for that cell, specifically Text Alignment for Horizontal is set to 'Justify'.
On top of that I have a macro that the users press a button to clear all contents on the page before pasting. I'd also like VBA code to set all cells at that time back to the default Text Alignment for Horizontal back to 'Center' so if the contents don't exceed the lengthy they aren't justified any longer. Basically I want to remove any previously set text alignments from above back to default so that everything is centered unless it exceeds a certain length.
Thanks for any help in advance.
Phil
I would like to use VBA to check a cell length, when the data is pasted in by the user, and if it exceeds a certain length then the formatting for that cell, specifically Text Alignment for Horizontal is set to 'Justify'.
On top of that I have a macro that the users press a button to clear all contents on the page before pasting. I'd also like VBA code to set all cells at that time back to the default Text Alignment for Horizontal back to 'Center' so if the contents don't exceed the lengthy they aren't justified any longer. Basically I want to remove any previously set text alignments from above back to default so that everything is centered unless it exceeds a certain length.
Thanks for any help in advance.
Phil