Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    London, Gtr London, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Underline rows in range (WinXP XL2002)

    After selecting a range of cells, I can use the Borders button drop down to give the cells borders, or give the range itself a box border all around, but I cant see how to give each row in the range an underline, without giving all the cells vertical borders as well. I need each row to be underlined, but the cells in each row need no vertical border - so that on printing it looks like lined paper. The idea is to guide the eye along a row to make reading data easier. Any help appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Underline rows in range (WinXP XL2002)

    Select the range, then select Format | Cells... and activate the Border tab.
    You can specify exactly which borders you want - see the screenshot, in which only the horizontal borders have been selected.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Underline rows in range (WinXP XL2002)

    After selecting the cells:
    Format - cells
    Border (tab)
    In the dialog, add a line to the top, middle, and bottom

    If it is something that you do frequently, you could create your own button and add it to the toolbar. Here is an example:
    <pre>Option Explicit
    Sub BottomBorders()
    Dim vBorders
    Dim x As Integer
    vBorders = Array(xlEdgeTop, xlEdgeBottom, xlInsideHorizontal)
    For x = 0 To UBound(vBorders)
    With Selection.Borders(vBorders(x))
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = xlAutomatic
    End With
    Next
    End Sub</pre>


    Adapt as needed...

    Steve

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Underline rows in range (WinXP XL2002)

    Another option:
    Use the underline button on the toolbar to underline the cell, the:
    - Autofill the line across and/or down
    - Select the cell with the line, and use the format painter to copy the formatting, select the range to underline
    - Copy the cell with the underline formatting, select the destination range and choiose paste special, formats.

    PS: All the above options will overwrite existing formatting in the destination cells. Either start the sheet with this formatting, or use the Format | Cells | Borders option.
    Regards,
    Rudi

  5. #5
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    London, Gtr London, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Underline rows in range Thanks, great answers

    Great stuff guys!
    I got so used to using the toolbar shortcut, I forgot there is a proper Borders and Shading dialog box

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •