I need to align a text in center in excel using vbscript
Do you need to center align the particular cell or wholecolumn?
You can try the below macro Code.
Sub travel() Dim cells As Range With Range("A3") .Merge .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter End With End Sub
Please check this video:
You can write your code then in this code for align. It is very simple to do that there.
Have you tried the above vba?