Solved

Diagonal Text

Posted on 2013-01-11
17
435 Views
Last Modified: 2013-01-12
This should be a quickie .... I'll up the points if it isn't.

As you can see, I can create nice diagonal headings on the merged cells A17:A22 and A27:32

However, It doesn't work on the single cell A35

I this a limitation with excel 2010, or am I doing something wrong?
Bad Diagonal
0
Comment
Question by:Eirman
  • 6
  • 5
  • 4
  • +2
17 Comments
 
LVL 13

Expert Comment

by:Shanan212
ID: 38767224
Should work!

Click on cell. Press Ctrl+1. Then on Alignment tab adjust the Orientation as you wish.

Are you following above steps?
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 350 total points
ID: 38767261
It's the borders that make it do that.
0
 
LVL 23

Author Comment

by:Eirman
ID: 38767386
Shanan212, I've tried every setting on the alignment tab .... and no joy.

You are correct rorya. If I remove all borders it does work .... but it looks horrible!
If I cannot find a workaround, I'll have to go with vertical text.

Any workaround suggestions?
(100 extra points added)


addendum .. White text on a black cell doesn't look too bad
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38767412
If you do the alignment before you do the borders it works in 2010. Here's a macro I recorded while doing it.


    Range("E1").Select
    With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 44
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Open in new window

0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38767421
I just did it in reverse with no problems either so there must be something else going on.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38767465
You could draw a parallelogram with no fill over the cell?
0
 
LVL 23

Author Comment

by:Eirman
ID: 38767499
Maybe it's my version of excel .... 14.0.6023.1000 (32bit)

It doesn't work whichever I do first ... even on a clean sheet. Once I add any borders it goes wonky!

Thanks for all replies. As it only a cosmetic issue, I won't pursue this question any further.
I'll award points shortly.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38767516
From your question I thought you were using Excel 2010, sorry.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38767549
Excel 14 = Excel 2010 ;)
0
 
LVL 23

Author Comment

by:Eirman
ID: 38767555
]
From your question I thought you were using Excel 2010, sorry
It is definitely 2010 (MS office Professional Plus 2010)
[embed=file 627288
office.jpg
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38767676
Excel 14 = Excel 2010 ;)
Oh.




Eirman, please look at the attached workbook.
Book2.xlsx
0
 
LVL 23

Author Comment

by:Eirman
ID: 38767804
I had a look at that martin. I presume that it's okay on your screen. It's skewed (square to parallogram) on my PC so I guess the problem is at my end. Thanks anyway.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38767806
That looks like this to me:
diag-text.png
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 38767836
This is embarrassing. It's not a problem on your end. I just never noticed that your 'Day' and 'Night' cells were different from what I am now assuming is the bad 'Notes' cell.
0
 
LVL 23

Author Comment

by:Eirman
ID: 38767963
I see that rorya is seeing the same distortion as me. Could this be an excel bug?

If you go back to my original question, you will see that it works fine with merged cells.
0
 
LVL 18

Expert Comment

by:Richard Daneke
ID: 38769217
You should have NO BORDERS on the cell with slant text.   This resolves the issue.

The slant lines show when borders are included on the cell.  In the merge cells, borders are not on the merged cells, but are on the following cells.
SlantText.xlsx
0
 
LVL 23

Author Comment

by:Eirman
ID: 38769814
Hi DoDahD. I've settled on white diagonal text on a black cell with no borders.
I now know that this is an excel bug/deficiency.

Regarding the merged cells .... I have a border along the top of the top cell and on the right of every cell. I get the same result if I insert the borders into the merged cells themselves or the adjacent cells.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now