Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Select a Range and Format

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Select a Range and Format

"Jaina WIlliams" wrote in message
...
: 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Select a Range and Format

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Select a Range and Format

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." wrote in message
oups.com...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
format first row within select Jackie Excel Programming 2 January 7th 05 11:37 PM
When I select "format cells", the format dialog box does not disp. Andy S. Excel Worksheet Functions 2 November 23rd 04 03:49 AM
Select Sheet then Select Range Gee[_2_] Excel Programming 3 May 27th 04 10:10 PM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"