View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
kalyan kalyan is offline
external usenet poster
 
Posts: 5
Default Urgent help regarding line chart thru Excel-VBA

Hi Tushar

I want all this process to be done programmatically...hope you
understand...

Regards
Kalyan


Tushar Mehta wrote:
Transfer the data from the three arrays into three columns using syntax
similar to (the untested)

range("a1").resize(ubound(arr1)-lbound(arr1)+1,1).value= _
application.worksheetfunction.transpose(arr1)

To get the code for the rest, turn on the macro recorder (Tools | Macro
Record new macro...), do the following by hand, turn off the recorder,
switch to the VBE and, if necessary, customize/generalize the XL-generated
code.
Click anywhere inside the the three columns then use the Chart Wizard to
create the chart. Once that's done, move one of the series to the secondary
axis. To do so, double-click the plotted series, then from the Axes tab
select 'Secondary'.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article .com,
says...
Hi All

I'm a newbie to the Excel-VBA .I need a code for my requirement and the
requirement is

if have three arrays

one array---random dates in a year say 2006

second array---random numbers between 1 and 50

third array--random numbers between 5 and 100

All the array sizes are of same length that is all of the three have
same upper bounds

now i need to generate an excel line chart programmatically such that

it contains one X-axis and two Y-axis(one on left and one on right)

pictorially graph should look like below

| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|---------------------------------------------------------|

one array should be plotted on X-axis
second array on left Y-axis
third array on right Y-axis

Please help...

Thanks & Regards
Kalyan Kamesh