Results 1 to 9 of 9

line or border inside a cell?

This is a discussion on line or border inside a cell? within the Excel Questions forums, part of the Question Forums category; I have a unique cell, lets say A1="A" and i want to draw a line or place a border horinzontal ...

  1. #1
    New Member
    Join Date
    May 2009
    Posts
    10

    Default line or border inside a cell?

    I have a unique cell, lets say A1="A"
    and i want to draw a line or place a border horinzontal or vertical inside the cell, so that the letter "A" looks like it was crossed.

  2. #2
    Board Regular phxsportz's Avatar
    Join Date
    Jun 2006
    Location
    Phoenix, AZ
    Posts
    1,985

    Default Re: line or border inside a cell?

    Code:
    With Selection.Borders(xlDiagonalDown)
            .LineStyle = xlContinuous
            .Weight = xlThin
            .ColorIndex = xlAutomatic
    End With
    I used to have a Darkroom, Now I have a PC... And it smells better
    WWW.SPUDSBAR.COM

  3. #3
    Board Regular
    Join Date
    Feb 2007
    Location
    England
    Posts
    3,248

    Default Re: line or border inside a cell?

    Couldn't you just use diagonal Borders for this, or am I missing something?

    Matty

  4. #4
    New Member
    Join Date
    May 2009
    Posts
    10

    Default Re: line or border inside a cell?

    No diagonals, i want to draw a path thru the cells, middle of them.

  5. #5
    Board Regular phxsportz's Avatar
    Join Date
    Jun 2006
    Location
    Phoenix, AZ
    Posts
    1,985

    Default Re: line or border inside a cell?

    The only thing I can think of is setting the Strike Through property on the font

    Code:
        With Selection.Font
            .Strikethrough = True
        End With
    Or if you know the specific cell.. simply put in
    Code:
    Range("YOUR CELL LOCATION").Font.Strikethrough = True
    Last edited by phxsportz; May 17th, 2009 at 07:47 PM.
    I used to have a Darkroom, Now I have a PC... And it smells better
    WWW.SPUDSBAR.COM

  6. #6
    New Member
    Join Date
    May 2009
    Posts
    10

    Default Re: line or border inside a cell?

    Thats horizontal and its ok, but what about vertical?

  7. #7
    Board Regular phxsportz's Avatar
    Join Date
    Jun 2006
    Location
    Phoenix, AZ
    Posts
    1,985

    Default Re: line or border inside a cell?

    Code:
        With Selection
             .Interior.Pattern = xlLightVertical
             .Font.Strikethrough = True
        End With
    I used to have a Darkroom, Now I have a PC... And it smells better
    WWW.SPUDSBAR.COM

  8. #8
    New Member
    Join Date
    May 2009
    Posts
    10

    Default Re: line or border inside a cell?

    what about one line only like the Strikethrough for the vertical, or a way to create a pattern of one vertical line?

  9. #9
    New Member
    Join Date
    May 2009
    Posts
    10

    Default Re: line or border inside a cell?

    Or how about drawing a shape above the cell with the line shape?

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com