Although I agree that regular Excel formulas cannot fix everything, I don't like VBA. There are several reasons for this, but the most important is that it will stop working with the next update. I'm not saying that you should not use VBA at all, but use it only when necessary.
Your question is a good example of necessity when VBA is not required. "Well, you say," but how can I fix this problem? "Feel good luck and click this link to answer the corresponding question here .
What you will learn in the link, how you can measure the exact grid of your diagrams. When the x axis crosses 0, you only need the maximum label of the Y axis for this. Now you are only halfway, because your specific problem has not yet been resolved. Here's how I will continue:
First, measure how tall your marks compare with the height of the chart. This will require some trial and error, but should not be very difficult. If your chart can add 20 labels without overlapping, this number will be, for example, 0.05.
Next, determine whether and where any of the labels will overlap. This is pretty simple because all you have to do is figure out where the numbers are too close to each other (within the range of 0.05 in my example).
Use some logic tests or whatever I need to get the IF formulas. As a result, you get a table with answers for each series (except the first). Do not be afraid to repeat this table again for the next step: creating a new chart entry.
There are several ways to create a new chart, but here is the one I would choose. For each series, create three lines. The first is a real line, the other two are invisible lines with data labels. For each line there is one invisible line with only regular labels. All use the same alignment. Each additional invisible line has a different binding for shortcuts. You will not need one for your first series, but for the second the label will be on the right, the third on the bottom, and the fourth on the left (for example).
If none of the data labels overlap, only the first invisible lines (with regular alignment) should show the values. When the marks overlap, the corresponding additional invisible line should take over this point and show its mark. Of course, the first invisible line should not show it there.
When all four labels overlap with the same x-axis value, you should see the first basic invisible line label and the three labels above the invisible lines. This should work for your sample diagram, because there is enough space to go to the labels on the left and right. Personally, I adhere only to the minimum and maximum mark at the overlap point, because its coincidence shows that the values ββare very close to each other in the first place.
Hope this helps you
Hi,
Patrick