Consulting

Results 1 to 7 of 7

Thread: Vba chart tool lable formating based on condition

  1. #1
    VBAX Regular
    Joined
    Feb 2019
    Posts
    23
    Location

    Question Vba chart tool lable formating based on condition

    HELLO,

    I am Using VBA Chart tool to display a chart and it also has label showing values (43,27 ,32 ,31 etc....).
    is there any way we can conditionally format chart label.
    for eg if label value is negative than show label in red color, if value is positive than show it in green.
    Capture.JPG

  2. #2
    what kind of chart are you using Modern chart?

  3. #3
    VBAX Regular
    Joined
    Feb 2019
    Posts
    23
    Location
    Am using chart tool

    Capture.JPG

  4. #4
    You are neither using Access nor VBA, but .Net. - I suggest you find a forum, which covers .Net WinForms programming, as you are much more likely to find someone who is familiar with that topic.
    Maybe research in the documentation of the Series class and it's children may also help.
    Learn VBA from the ground up with my VBA Online Courses.

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,281
    Location
    Sorry "old" thread but whilst it suggests the thread was solved, to me it clearly wasn't.

    To make negative numbers in an Excel chart appear in a different colour, you can change the negative number style for the cells in the chart:
    1. Select the cells you want to format
    2. In the Category box, click Number or Currency
    3. Under Negative numbers, select an option for negative numbers

    You can also change the colour of a chart by using the Chart Styles button:
    1. Click the chart you want to change
    2. In the upper-right corner, click Chart Styles
    3. Click Colour and pick the colour scheme you want
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  6. #6
    Quote Originally Posted by Aussiebear View Post
    To make negative numbers in an Excel chart appear [...]
    This thread wasn't about an Excel chart!
    While the OP claimed to use VBA, the second screenshot clearly shows that he is using a .Net Chart control in Visual Studio.
    Learn VBA from the ground up with my VBA Online Courses.

  7. #7
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,281
    Location
    Thank you PhilS for your reply, however since this forum isn't about .Net, the solution supplied gives those viewing this thread an option for completing the same task within EXCEL.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •