Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
robinsongary
 
Posts: n/a
Default Excel should allow you to create borders around columns easier

Excel provides a number of options for creating borders around selected
cells, but does not do a good job at allowing you to automatically format
colums with borders. For example, if are working with Columns A-B-C and rows
2-10 and want to put a border around each column (A2-A10, B2-B10, and
C2-C10), you have to select each column and select the "box" border. What
would be great is if there was a button that you could push that would do
this for you, like when you select a group of cells and want every cell in
that group to have a border.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc
  #3   Report Post  
Posted to microsoft.public.excel.misc
robinsongary
 
Posts: n/a
Default Excel should allow you to create borders around columns easier

I ran your code but it puts a border around every cell. What I was looking
for was selecting a number of columns containing a number of cells, say a 10
by 10 block. I would like just the columns to have a border. Not every cell
within the column. Thanks for the suggestion though.

"Don Guillett" wrote:

How about

Sub doborders()
Selection.Borders.Weight = xlMedium 'Thick
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
Excel provides a number of options for creating borders around selected
cells, but does not do a good job at allowing you to automatically format
colums with borders. For example, if are working with Columns A-B-C and
rows
2-10 and want to put a border around each column (A2-A10, B2-B10, and
C2-C10), you have to select each column and select the "box" border. What
would be great is if there was a button that you could push that would do
this for you, like when you select a group of cells and want every cell in
that group to have a border.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc



  #4   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Excel should allow you to create borders around columns easier

OK. Try this

Sub ColumnBorders()
Dim rng As Range
Set rng = Selection 'Range("a1", "d10")
'MsgBox rng.Address
fr = rng.Cells(1).Row
'MsgBox "first row is " & fr
fc = rng.Cells(1).Column 'Range("a1").Address
'MsgBox "first column is " & fc
lr = Range(rng.Address). _
Cells(Range(rng.Address).Cells.Count).Row
'MsgBox "Last row is " & lr
lc = Range(rng.Address). _
Cells(Range(rng.Address).Cells.Count).Column
'MsgBox "last column is " & lc
numcols = lc - fc + 1
'MsgBox numcols
For i = fc To numcols - 1 + fc
Range(Cells(fr, i), Cells(lr, i)). _
BorderAround Weight:=xlMedium
'MsgBox i
Next i
Cells(fr, fc).Select
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
I ran your code but it puts a border around every cell. What I was looking
for was selecting a number of columns containing a number of cells, say a
10
by 10 block. I would like just the columns to have a border. Not every
cell
within the column. Thanks for the suggestion though.

"Don Guillett" wrote:

How about

Sub doborders()
Selection.Borders.Weight = xlMedium 'Thick
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
Excel provides a number of options for creating borders around selected
cells, but does not do a good job at allowing you to automatically
format
colums with borders. For example, if are working with Columns A-B-C
and
rows
2-10 and want to put a border around each column (A2-A10, B2-B10, and
C2-C10), you have to select each column and select the "box" border.
What
would be great is if there was a button that you could push that would
do
this for you, like when you select a group of cells and want every cell
in
that group to have a border.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the
"I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc





  #5   Report Post  
Posted to microsoft.public.excel.misc
robinsongary
 
Posts: n/a
Default Excel should allow you to create borders around columns easier

OK...Your a genius. This is perfect. Thanks.

"Don Guillett" wrote:

OK. Try this

Sub ColumnBorders()
Dim rng As Range
Set rng = Selection 'Range("a1", "d10")
'MsgBox rng.Address
fr = rng.Cells(1).Row
'MsgBox "first row is " & fr
fc = rng.Cells(1).Column 'Range("a1").Address
'MsgBox "first column is " & fc
lr = Range(rng.Address). _
Cells(Range(rng.Address).Cells.Count).Row
'MsgBox "Last row is " & lr
lc = Range(rng.Address). _
Cells(Range(rng.Address).Cells.Count).Column
'MsgBox "last column is " & lc
numcols = lc - fc + 1
'MsgBox numcols
For i = fc To numcols - 1 + fc
Range(Cells(fr, i), Cells(lr, i)). _
BorderAround Weight:=xlMedium
'MsgBox i
Next i
Cells(fr, fc).Select
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
I ran your code but it puts a border around every cell. What I was looking
for was selecting a number of columns containing a number of cells, say a
10
by 10 block. I would like just the columns to have a border. Not every
cell
within the column. Thanks for the suggestion though.

"Don Guillett" wrote:

How about

Sub doborders()
Selection.Borders.Weight = xlMedium 'Thick
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
Excel provides a number of options for creating borders around selected
cells, but does not do a good job at allowing you to automatically
format
colums with borders. For example, if are working with Columns A-B-C
and
rows
2-10 and want to put a border around each column (A2-A10, B2-B10, and
C2-C10), you have to select each column and select the "box" border.
What
would be great is if there was a button that you could push that would
do
this for you, like when you select a group of cells and want every cell
in
that group to have a border.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the
"I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc








  #6   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Excel should allow you to create borders around columns easier

Aw shucks.

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
OK...Your a genius. This is perfect. Thanks.

"Don Guillett" wrote:

OK. Try this

Sub ColumnBorders()
Dim rng As Range
Set rng = Selection 'Range("a1", "d10")
'MsgBox rng.Address
fr = rng.Cells(1).Row
'MsgBox "first row is " & fr
fc = rng.Cells(1).Column 'Range("a1").Address
'MsgBox "first column is " & fc
lr = Range(rng.Address). _
Cells(Range(rng.Address).Cells.Count).Row
'MsgBox "Last row is " & lr
lc = Range(rng.Address). _
Cells(Range(rng.Address).Cells.Count).Column
'MsgBox "last column is " & lc
numcols = lc - fc + 1
'MsgBox numcols
For i = fc To numcols - 1 + fc
Range(Cells(fr, i), Cells(lr, i)). _
BorderAround Weight:=xlMedium
'MsgBox i
Next i
Cells(fr, fc).Select
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in message
...
I ran your code but it puts a border around every cell. What I was
looking
for was selecting a number of columns containing a number of cells, say
a
10
by 10 block. I would like just the columns to have a border. Not
every
cell
within the column. Thanks for the suggestion though.

"Don Guillett" wrote:

How about

Sub doborders()
Selection.Borders.Weight = xlMedium 'Thick
End Sub

--
Don Guillett
SalesAid Software

"robinsongary" wrote in
message
...
Excel provides a number of options for creating borders around
selected
cells, but does not do a good job at allowing you to automatically
format
colums with borders. For example, if are working with Columns A-B-C
and
rows
2-10 and want to put a border around each column (A2-A10, B2-B10,
and
C2-C10), you have to select each column and select the "box" border.
What
would be great is if there was a button that you could push that
would
do
this for you, like when you select a group of cells and want every
cell
in
that group to have a border.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to
the
suggestions with the most votes. To vote for this suggestion, click
the
"I
Agree" button in the message pane. If you do not see the button,
follow
this
link to open the suggestion in the Microsoft Web-based Newsreader
and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc








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
Create form to add data to Excel 40 odd columns Dexxterr Excel Discussion (Misc queries) 6 May 15th 06 08:43 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
How do I create multiple columns from a one-column list in Excel? Melissa Excel Worksheet Functions 5 October 5th 05 03:32 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
How do I create columns that expand and collapse in Excel? Curious Excel ER Excel Worksheet Functions 2 June 11th 05 12:31 AM


All times are GMT +1. The time now is 10:02 PM.

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

About Us

"It's about Microsoft Excel"