Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
 
Posts: n/a
Default getting the x-axis value through VBA

Hi All,

I am facing some peculiar problem. I need to find the first x-axis
datapoint value from the chart through VBA. That is finding the
categoryvalue of datapoint for x -axis.

Is their any function avilable in VBA.


Thanxs in advance

Syam

  #2   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier
 
Posts: n/a
Default getting the x-axis value through VBA

It works like this:

Sub GetXValue

' declare a variant to hold the array of X values
Dim XVals as Variant

' declare another variant to hold the category
Dim X As Variant

' populate the array
XVals = ActiveChart.SeriesCollection(1).XValues

' get the value you need
X = XVals(1)

' output the value
Debug.Print X

End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services - Tutorials and Custom Solutions -
http://PeltierTech.com/
2006 Excel User Conference, 19-21 April, Atlantic City, NJ
http://peltiertech.com/Excel/ExcelUserConf06.html
_______


wrote in message
oups.com...
Hi All,

I am facing some peculiar problem. I need to find the first x-axis
datapoint value from the chart through VBA. That is finding the
categoryvalue of datapoint for x -axis.

Is their any function avilable in VBA.


Thanxs in advance

Syam



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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
how to add a second x axis with same Y axis value in one plot Mike Charts and Charting in Excel 1 October 19th 05 08:42 AM
Secondary Axis Match Primary Axis Gridlines [email protected] Charts and Charting in Excel 1 July 31st 05 09:23 PM
Pivot Table, Line Chart with Secondary Y axis, Page Field selection destroys Y2 axis [email protected] Charts and Charting in Excel 0 July 13th 05 09:30 PM
can't change how data on 2nd axis is being displayed Rebekah Charts and Charting in Excel 1 May 4th 05 02:51 PM


All times are GMT +1. The time now is 11:36 AM.

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"