jish
05-10-2019, 11:22 AM
Hi,
Is it possible to have simple Excel macro to change the cell vertical alignment to center throughout a table without affecting the indents? When doing it manually, one has to first select cells with similar indents to change the alignment---otherwise, the indents are changed to match those of the first selected cell. Alternatively, one can do it cell by cell, which also does not affect the indents.
In a perfect world, it would be wonderful also for the horizontal alignment to be set to left, the text wrap to be turned off, and the number format to be set to text for any cells that don't contain numbers (or at least those that are already not set to "Number")---all without affecting anything else in the cell, like the indents---but these would just be gravy. The real problem is resetting the vertical alignment.
Vertical Alignment = Center
Horizontal Alignment = Left
Wrap Text =False
Number format (only for cells than contain letters) = Text
I'm using Excel 2016. Any help one could give would be greatly appreciated. Obviously, I am aware of the existence macros but don't know how to write them properly. I have searched for a macro that does this, but haven't found one.
Thank you---
Is it possible to have simple Excel macro to change the cell vertical alignment to center throughout a table without affecting the indents? When doing it manually, one has to first select cells with similar indents to change the alignment---otherwise, the indents are changed to match those of the first selected cell. Alternatively, one can do it cell by cell, which also does not affect the indents.
In a perfect world, it would be wonderful also for the horizontal alignment to be set to left, the text wrap to be turned off, and the number format to be set to text for any cells that don't contain numbers (or at least those that are already not set to "Number")---all without affecting anything else in the cell, like the indents---but these would just be gravy. The real problem is resetting the vertical alignment.
Vertical Alignment = Center
Horizontal Alignment = Left
Wrap Text =False
Number format (only for cells than contain letters) = Text
I'm using Excel 2016. Any help one could give would be greatly appreciated. Obviously, I am aware of the existence macros but don't know how to write them properly. I have searched for a macro that does this, but haven't found one.
Thank you---