I am looking to do 2 things
1> I want to select the whole worksheet and remove any
fill colors and then
I want to select a specific Range in a spreadsheet (eg
B5:d10) and right Justify all the data in the worksheet
Thanks
I am looking to do 2 things
1> I want to select the whole worksheet and remove any
fill colors and then
I want to select a specific Range in a spreadsheet (eg
B5:d10) and right Justify all the data in the worksheet
Thanks
Hi, if you record a macro and manually do what you describe it will
generate the following code:
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("B5:D10").Select
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
HTH--Lonnie M.
"Jaina WIlliams" <[email protected]> wrote in message
news:[email protected]...
: I am looking to do 2 things
: 1> I want to select the whole worksheet and remove any
: fill colors and then
: I want to select a specific Range in a spreadsheet (eg
: B5:d10) and right Justify all the data in the worksheet
:
: Thanks
Have you tried using the macro recorder while doing this? It will write the
code for you.
Paul D
But then you should tidy it up to get rid of the garbage
Cells.Interior.ColorIndex = xlNone
Range("B5:D10").HorizontalAlignment = xlRight
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Lonnie M." <[email protected]> wrote in message
news:[email protected]...
> Hi, if you record a macro and manually do what you describe it will
> generate the following code:
>
> Cells.Select
> Selection.Interior.ColorIndex = xlNone
> Range("B5:D10").Select
> With Selection
> .HorizontalAlignment = xlRight
> .VerticalAlignment = xlBottom
> .WrapText = False
> .Orientation = 0
> .AddIndent = False
> .IndentLevel = 0
> .ShrinkToFit = False
> .ReadingOrder = xlContext
> .MergeCells = False
> End With
>
> HTH--Lonnie M.
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks