Tricky (?) data labels position problem

mrcheeks

New Member
Joined
Sep 19, 2011
Messages
5
I want the default position of the data labels of the first series in my BarStacked100 chart to be in the center, i.e.: "DataLabelCenter".

However, when the position of centered data labels is more to the left than it would be if I used "DataLabelInsideBase", then i would like like them to be inside base, i.e.: "DataLabelInsideBase".

The reason I would like this is that when the value of a point is small, e.g. 1 %, then the data label for that point is partly on the axis of the chart. I would like it not to be.

Is it possible to automatically determine if centered data labels is more to the left then data labels inside base?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
___________________^
Posting newb in action |

I forgot to mention that I'm looking for the VBA code to determine said problem (i.e. automatically determine if centered data labels is more to the left than data labels inside base).

Somthing along the lines of
Code:
For i = 1 to myChart.SeriesCollection(1).Points.Count
 If myChart.SeriesCollection(1).Point(i).DataLabels.Position = Center Then
  If myChart.SeriesCollection(1).Point(i).DataLabels.[something to determine how far left the data label is] = [Too far left] Then
   myChart.SeriesCollection(1).Point(i).DataLabels.Position = InsideBase
Next i

I would very much appreciate your help!

mrcheeks
 
Upvote 0
I'm bumping this as I desperately need help from the sharp minds on this forum. Anyone feeling like having a go at this?

mrcheeks
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top