LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Inserting labels and bars

Hi,
I have to generate a column graph for the following data:
Quarterly sales by division (in thousands)
Div 1 Div 2 Div 3 Div 4
Jan 549 542 670 640
Feb 845 259 360 961
Mar 852 391 296 425
I used the code mentioned below.
Public Sub test()
Dim cht As Excel.Chart
Dim wsh As Excel.Worksheet
Set cht = Charts.Add
With cht
.ChartType = xlColumnClustered
.SetSourceData Source:=Sheets("Save a custom chart
type").Range("B3:B5")
.SetSourceData Source:=Sheets("Save a custom chart
type").Range("C3:C5")
.SetSourceData Source:=Sheets("Save a custom chart
type").Range("D3:D5")
Set wsh = ActiveWorkbook.Worksheets(1)
With wsh.Shapes(1)
.Top = 0
.Left = 0
.Width = 200
.Height = 200
End With
End With
End Sub
But the output i needed was like this: x- axis has div1,2,3 with each
div having three corresponding bars along with the category and labels.
Can anyone suggest modificaitons to the code to get the desired format
of graph?
Would greatly appreciate help in this matter.
Thanks in advance...

 
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
Excel stack column: how to remove empty labels? [email protected] Charts and Charting in Excel 2 July 13th 06 06:04 PM
Unique labels in each stacked bar? Dennis Mac Charts and Charting in Excel 1 May 3rd 06 12:16 AM
Data labels out of reach Marcus Langell Charts and Charting in Excel 3 February 9th 06 09:06 AM
Producing line and bar graphs on same axis smurray444 Charts and Charting in Excel 1 November 21st 05 05:20 PM
Add data labels without displaying data points? Brenda Charts and Charting in Excel 3 October 27th 05 04:10 AM


All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"