Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Using Excel 2003, I have to add data to a spreadsheet throughout the data by
pasting data from a query. Is the some code to center data in a column and/or right or left justify as well? I am a novice macro coder so all help is greatly appreciated. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Have you tried recording a macro while doing manually. Then clean up
sub centercol Columns("E:F").horizontalAlignment = xlCenter end sub Sub Macro1() ' ' Macro1 Macro ' Macro recorded 7/9/2007 by Donald B. Guillett ' ' Columns("E:F").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Rich K." wrote in message ... Using Excel 2003, I have to add data to a spreadsheet throughout the data by pasting data from a query. Is the some code to center data in a column and/or right or left justify as well? I am a novice macro coder so all help is greatly appreciated. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks - that's what I did - the only problem I had with centering the column
was that it was a shared workbook. Once I took that off, works great, Thanks for the tips and help "Don Guillett" wrote: Have you tried recording a macro while doing manually. Then clean up sub centercol Columns("E:F").horizontalAlignment = xlCenter end sub Sub Macro1() ' ' Macro1 Macro ' Macro recorded 7/9/2007 by Donald B. Guillett ' ' Columns("E:F").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Rich K." wrote in message ... Using Excel 2003, I have to add data to a spreadsheet throughout the data by pasting data from a query. Is the some code to center data in a column and/or right or left justify as well? I am a novice macro coder so all help is greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting macro to run with pasted function | New Users to Excel | |||
Transposing a pasted link row into a column | Excel Discussion (Misc queries) | |||
pasted column splits at spaces | Excel Worksheet Functions | |||
Macro code to autosum a dynamic length column | Excel Discussion (Misc queries) | |||
Prevent Hidden Column data from being copied/pasted? | Excel Discussion (Misc queries) |