Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 9
Default Bar-chart intervals

have a large amount of measurements, about 3000.
they have a value between -10 and 10.

I would like to make a bar-chart. which shows how many measurements there are between.

-10..-9
-9..-8

etc.

where the y axis are the number of values per interval...and the x axis are the intervals.

-10 -9 -8 -7 -6 -5 etc.

would like to make it as a macro. The values are in column G


I have attached a file with the examples of values...column A is not formattet only text.

Kim
Attached Images
File Type: pdf values.pdf (19.4 KB, 50 views)

Last edited by kima : November 9th 12 at 04:29 PM
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by kima View Post
have a large amount of measurements, about 3000.
they have a value between -10 and 10.

I would like to make a bar-chart. which shows how many measurements there are between.

-10..-9
-9..-8

etc.

where the y axis are the number of values per interval...and the x axis are the intervals.

-10 -9 -8 -7 -6 -5 etc.

would like to make it as a macro. The values are in column G



Kim
What do you mean by "I would like to make it as a macro"?
  #3   Report Post  
Junior Member
 
Posts: 9
Default

I would like it to make the bar chart with a "one-click" macro.
Like the one I have for my line chart:

Code:
Sub OpretGraf()

'Opretter og formatere graf

    With ActiveSheet.ChartObjects.Add _
            (Left:=10, Width:=800, Top:=10, Height:=400)
        .Chart.SetSourceData Source:=Sheets(1).Range("A:A,G:G")
        .Chart.ChartType = xlLine
        
        'Y-akse max og min
        
        .Chart.Axes(xlValue).MaximumScale = 40
        .Chart.Axes(xlValue).MinimumScale = -40
        .Chart.Axes(xlValue).MajorUnit = 5
        
        'Text på X- og Y-akse
        
        .Chart.Axes(xlCategory).TickLabelPosition = xlLow
        '.Chart.Axes(xlCategory).TickLabels.Offset = 1000
        .Chart.Axes(xlCategory).TickLabels.Font.Size = 10
        .Chart.Axes(xlCategory, xlPrimary).HasTitle = True
        .Chart.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Log tidspunkt"
        
        
        .Chart.Axes(xlValue, xlPrimary).HasTitle = True
        .Chart.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Spænding"
        
        'Font størrelse og tal format
        
        .Chart.Axes(xlValue).TickLabels.NumberFormat = "0"
        .Chart.Axes(xlValue).TickLabels.Font.Size = 12
        
        'Data linje tykkelse
        
        .Chart.SeriesCollection(1).format.Line.Weight = 1
        
        'Fjerner data label
        
        .Chart.HasLegend = False
        
        'Indsætter overskrift med logging interval. Start tid+dato - slut tid+dato
        
        .Chart.HasTitle = True
        .Chart.ChartTitle.Text = IIf([a2].Text < "", [a2].Text, [a2].End(xlDown).Text) & _
        " - " & Cells(Rows.Count, "A").End(xlUp).Text


    End With

End Sub
Kim
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
Line chart- exact intervals Betty Charts and Charting in Excel 3 January 24th 07 03:08 PM
How do I do a chart with overlaying confidence intervals? Nurse Researcher Charts and Charting in Excel 1 October 9th 06 09:45 PM
Chart Displaying Dates and Intervals. Andy Charts and Charting in Excel 0 March 20th 06 10:01 AM
need to make chart w/ confidence intervals and don't know how penguinchick Charts and Charting in Excel 2 September 21st 05 02:57 PM
need to make chart w/ confidence intervals and don't know how penguinchick Charts and Charting in Excel 0 September 20th 05 06:41 PM


All times are GMT +1. The time now is 10:34 PM.

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"