Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Label Position - Above & Below

Hi

I have a Line Chart with one series. I have added the labels to this
series. All labels start with B or S. I need all labels starting with
S to be above the line and alls tarting with B below the line.

Is it possible to create a macro that can do this?

The labels area all in a separte column and are a concatenation of
text (B or S) and some percentages.

Best
Prasad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Label Position - Above & Below

Try this as a starter .......

Sub PositionLabels()
Dim x As Integer
With ActiveSheet.ChartObjects("Chart 1").Activate
For x = 1 To 12
With ActiveChart.SeriesCollection(1).Points(x).DataLabe l
Select Case Left(.Text, 1)
Case Is = "S": .Position = xlLabelPositionAbove
Case Is = "B": .Position = xlLabelPositionBelow
Case Else: .Position = xlLabelPositionCenter
End Select
End With
Next
End With
End Sub

--

Regards,
Nigel




"EE" wrote in message
...
Hi

I have a Line Chart with one series. I have added the labels to this
series. All labels start with B or S. I need all labels starting with
S to be above the line and alls tarting with B below the line.

Is it possible to create a macro that can do this?

The labels area all in a separte column and are a concatenation of
text (B or S) and some percentages.

Best
Prasad


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
Default Data Label Position Kermit Charts and Charting in Excel 2 January 16th 08 01:18 AM
label position affected by wide screen? Patricia D Excel Programming 2 August 13th 07 06:04 AM
Outside Label Position not listed Debbie Charts and Charting in Excel 1 September 8th 06 10:28 AM
Bar charts with negative values and label position Pearl Quan Charts and Charting in Excel 3 April 25th 05 10:51 PM
Data Label Object Position not working Sean[_7_] Excel Programming 0 August 12th 04 10:14 PM


All times are GMT +1. The time now is 01:20 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"