Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create form to add data to Excel 40 odd columns | Excel Discussion (Misc queries) | |||
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER | New Users to Excel | |||
How do I create multiple columns from a one-column list in Excel? | Excel Worksheet Functions | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
How do I create columns that expand and collapse in Excel? | Excel Worksheet Functions |