Macro to change position of chart labels on line chart

Hello all,

I have quite a trickly problem to solve and I would appreciate any
suggestions.

I have a dashboard page in a worksheet which shows financial KPIs
(i.e. sales) as forecast this year versus last year.  There are a
number of line charts on the dashboard showing the differing
forecasts; the user of the dashboard can choose a business unit to
view.

What I would like to be able to do is to have the chart labels for
these charts automatically change their aligmnent so that they display
properly.  I have set the chart labels to display "Above" for the new
forecast and "Below" for the previous forecast, but in cases where the
forecast has been revised downards the labels do not display properly.

So the macro would need to:
- check if the business unit selected has changed
- check each each point on each chart (there are two series) and for
each pair of values for each year, set the alignment of the chart
label to "Above" for the higher value and "Below" for the lower value

Any suggestions about how to write this macro (or whether it's even
possible) or other solutions would be really gratefully appreciated!

Thanks in advance,
Shane
0
5/26/2011 6:31:07 AM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
795 Views

Similar Articles

[PageSpeed] 19

On May 26, 6:31=A0pm, Shane Henderson <shane.a.hender...@gmail.com>
wrote:
> Hello all,
>
> I have quite a trickly problem to solve and I would appreciate any
> suggestions.
>
> I have a dashboard page in a worksheet which shows financial KPIs
> (i.e. sales) as forecast this year versus last year. =A0There are a
> number of line charts on the dashboard showing the differing
> forecasts; the user of the dashboard can choose a business unit to
> view.
>
> What I would like to be able to do is to have the chart labels for
> these charts automatically change their aligmnent so that they display
> properly. =A0I have set the chart labels to display "Above" for the new
> forecast and "Below" for the previous forecast, but in cases where the
> forecast has been revised downards the labels do not display properly.
>
> So the macro would need to:
> - check if the business unit selected has changed
> - check each each point on each chart (there are two series) and for
> each pair of values for each year, set the alignment of the chart
> label to "Above" for the higher value and "Below" for the lower value
>
> Any suggestions about how to write this macro (or whether it's even
> possible) or other solutions would be really gratefully appreciated!
>
> Thanks in advance,
> Shane

How about a dummy series for each graph series which is a suitable
amount above or below its matching series as calulated from the data.
So if series A is above series B at a particular point, the dummy
series A has say 10 added on to A and dummy series B has 10 taken off
B.  And vice versa.  Now put the labels onto the dummy points (I am
assuming that you are using ChartLabeller) and shift them using
Labeller so that they are sitting on top of the dummies.  The dummies,
of course have no markers.

xt
0
5/27/2011 8:31:04 AM
Reply:

Similar Artilces:

Chart to represent sale number by individual contrubtion vs total
I need help on how to create a chart to represent sales number by individual contributor vs total. E.g. Alvin = $50 Mary = $150 John = $80 Kate = $120 Total = $400 The chart should show a graphical representation of $400 as the total, and it shows how each person contribute to the chart. Hi, One way would be to plot the data, not including the total as a stacked column. Alternately, you could plot the data without the total as a column chart and then plot the total as a line on the same chart. Just make a second series with each item the total. -- If this helps, please click th...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

Allow change to Activity Views in MS CRM
a CRM Administrator should be able to customise Activity Views and change the views to reflect pecific information eg of views Signed on Users Activites Closed /Open My Open Activites My Closed Activites Should, but unfortunately in the current release, they can't. This will be addressed in CRM 2005 though. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On Thu, 10 Mar 2005 21:57:03 -0800, "N.Pinto" <N.Pinto@discussions.microsoft.com> wrote: a CRM Administrator should be able to customise Activity Views...

when inserting a chart excel is saying i cannot add any new fonts
When I attempt to insert a chart i am getting a message which says,"no new fonts may be added to this workbook". I am adding it to a billing process and I did the first 100 or so before it began this doing this, I am not adding any new fonts but I am getting this message, any suggestions on what is the cause so I can overcome it? I've described the problem and fix here: Error: "No more new fonts may be applied in this workbook" http://peltiertech.com/Excel/Charts/FixFonts.html - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltier...

When changing end time in appointment crm cannot save duration
Hello all When we started running the crm with https instead of http the following error appeared: When you change the end time of an appointment, CRM cannot save the change to duration. Error message: "Microsoft CRM was unable to save the change to duration. Try changing the duration value again." Any ideas? Regards Magnus Also, the error is only surfacing in the web client. /Magnus "Magnus Olsson" wrote: > Hello all > > When we started running the crm with https instead of http the following > error appeared: When you change the end time of an app...

Is there a formular or format to change 1 to one
Is there a formular or format to change a number "1" into the word "one". Hi Kevin, See: http://www.xldynamic.com/source/xld.xlFAQ0004.html --- Regards, Norman "Kevin" <Kevin@discussions.microsoft.com> wrote in message news:3C099B0B-82F6-44FB-AD72-B0F726256F96@microsoft.com... > Is there a formular or format to change a number "1" into the word "one". See http://www.xldynamic.com/source/xld.xlFAQ0004.html -- HTH RP (remove nothere from the email address if mailing direct) "Kevin" <Kevin@discussions.micro...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

Changing Rows to Columns
Is it possible to easily rotate a spreadsheet or part of a spreadshet, to change the data in rows to columns? Do to a sorting problem in the charts I create, it seems I have to sort the data in the spreadsheet first. Any help would be appreciated. Hi, Sure is a way. select & copy your data. then select the cell where you want to re-paste; right-click and select paste special; in the dialog box check "transpose". Ok. jeff >-----Original Message----- >Is it possible to easily rotate a spreadsheet or part of a >spreadshet, to change the data in rows to columns? D...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Let me use the Line Color icon on charts
It would speed up a lot of my work if I could use the Line Color icon on Excel charts, the same way I am able to use the Fill Color and Font Color icons. However, when I highlight any chart object, like the Plot Area, Chart Area, or a Series, the Line Color icon is disabled. -- Stuart Bratesman, Jr., MPP Muskie School of Public Service Univ. of Southern Maine Portland, Maine ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If ...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

pivot chart add a ligne not in the pivot table
hello, I've a pivot table and the related graph and I would like to add 2 ligne who represents the minimun and maximum value before alarm. I would like to knwo how to create 2 ligne in a chart by vba Thanks You can create a normal chart, based on the pivot table, and include the additional lines in that. On Jon Peltier's site, there are instructions for creating a normal chart from pivot data: http://www.peltiertech.com/Excel/Pivots/pivotcharts.htm And for adding lines to a chart: http://www.peltiertech.com/Excel/Charts/ComboCharts.html#AddLine To create the code, you ...

change background graphic for all slides
I am working with a .potx file and I would like to change the background image. I did a search in this newsgroup, and found advice in many threads, to change the photo (which I'm able to do), and then to check the box/option that allows you to apply the change to all slides. I cannot see where I am given this choice (to apply the new photo as a background to all slides). I do want to retain all the text that is on top of the photo, just change the background. How, with PPT 2007, can I do this? Hi RIGHT click on a blank area of the slide Format Background > Picture > File...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

Calling on a macro within a macro!
Hey All!! Quick Question - How do you call up a macro within a current macro? I have one big macro and I need it to jump to several other macros when it runs! Does it matter where the other macros are stored or is it better to have them all in one module? Help appreciated Thnx! Hi Mellowe, '=============>> Public Sub Main() 'Your code Call One 'your code End Sub '<<============= '=============>> Public Sub One() MsgBox "Hi from One" End Sub '<<============= > Does it matter where the other macros are stored or ...

shortcut keys to macros
Hi, Is it at all possible to assign shortcut keys to macros in Outlook? Thx, Hans ...

Change default "Show names from the:" option
Clicking the "To:" button in a new Outlook email message brings up the "Select Names" dialog box. This dialog displays the contents of contact databases such as My Outlook Address Book and Global Address List. Is there a way to change the default database selected in the "Show names from the:" line from the current Global Address List to the contacts in my Outlook Address Book? My version of Outlook connects with an Exchange server to acces mail, contacts, etc. Thanks for any suggestions, Kerry You probably meant to post your Outlook version so we coul...

Trend Line constants as Excel Cell Values
I want to put the constants of a 2 degree polynomial trend line into Excel Cells. Are there formula's to do this? Equation is Y = Ax(2) + Bx + C. I want the value of A,B and C in seperate cells. Can anyone suggest how this can be done? Thanks -- Ken Hi Ken, Supposing your x-range is in A2:A10, and y-range in B2:B10, select a 3-column x 1-row area and enter the following formula and confirm with CTRL-SHIFT-ENTER. =LINEST(B2:B10,A2:A10^{0,1,2},0,) Regards, B. R. Ramachandran "Ken" wrote: > I want to put the constants of a 2 degree polynomial trend line into Excel &g...

Impossible to change Messenger picture in Windows Live
I have a very annoying problem with the Messenger picture: An old picture (which I no longer want to use) from Windows Live Messenger is still showing up if my contacts click on my Windows Live name in their contact list. This old picture is also the one which shows up if a contact clicks in my name in Messenger when I am not logged in. Whne I am logged in my normal picture is displayed in Messenger. I have tried in vain to change this by adjusting the settings in my Windows Live profile, but it does not seem to work. I really need help! I should add that this old pictu...

help Unable to record Macro !!!!!!!
I want to record a macro in excel.But as soon as I click record Macro it says "unable to record" macro. Got no help in excel help.I do this same thing in word and it's working. Please help It's urgent for me !!!1 Have a look here http://groups.google.com/groups?as_epq=unable%20to%20record&as_ugroup=microsoft.public.excel.* -- Don Guillett SalesAid Software donaldb@281.com "ash" <anonymous@discussions.microsoft.com> wrote in message news:3e0b01c42ae5$45333e00$a401280a@phx.gbl... > I want to record a macro in excel.But as soon as I click > record...

Is there functionality to audit changes made to records in CRM 3.0
I'm looking to find out if there's a way to audit the changes made to records such as accounts in CRM 3.0. I'm specifically looking to track who an account was assigned to in the past, when it was assigned, etc. Thanks in advance! Have you Tried the c360 tool http://www.c360.com/Audit.aspx "XMcknight" wrote: > I'm looking to find out if there's a way to audit the changes made to records > such as accounts in CRM 3.0. I'm specifically looking to track who an > account was assigned to in the past, when it was assigned, etc. > > Thanks i...