ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Usenet Groups > Excel Charting

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 09-02-2008, 02:26 PM
mstrnoob mstrnoob is offline
Registered User
 
Join Date: 02 Sep 2008
Location: Planet Earth
Posts: 3
mstrnoob is on a distinguished road
Marking different data types in plotted data

I a using Excel 2000 at work and am graphing historical data. The data was recorded every month for the past 12+ years. Looks like

"area 1" "month 1" "month 2" .... "month x"
"area 2" "month 1" "month 2" .... "month x"
"area ..." "month 1" "month 2" .... "month x"
"area x" "month 1" "month 2" .... "month x"

There are random months in each year that the collected data was either invalid or guessed so its cell is highlighed yellow. Is there a way that I can graph the all of the data and "invalid" data, the actual data marker on the graph, would be a different color or marker type?
Reply With Quote
  #2  
Old 09-03-2008, 05:09 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Moderator
 
Join Date: 10 May 2004
Location: Essex, UK
Posts: 2,303
Andy Pope will become famous soon enough Andy Pope will become famous soon enough
It's very hard to tell from the data posted, a workbook with example data would be more helpful.

To get different coloured markers you can either use additional series, plotting only relevant points. Or vba code.

Is the colouring of the invalid cells done via Conditional formatting or just manually?
__________________
Cheers
Andy
Reply With Quote
  #3  
Old 09-03-2008, 02:41 PM
mstrnoob mstrnoob is offline
Registered User
 
Join Date: 02 Sep 2008
Location: Planet Earth
Posts: 3
mstrnoob is on a distinguished road
Attached is a small example of what I am working with. There is a large amount of data so seperating valid and invalid data into different rows, and then graphing, would be too messy and confusing.

All data and highlighting is/was done manually. Basically the highlighting indicates that the data was not physically measured/recorded but was approximated.

Each row is plotted in a seperate graph. I am wondering if there is a way to mark the "invalid" cells so when the row is plotted, using excel's built in chart, that at each data marker is a different color and/or marker type.

If that can not be done "automatically" but can only be done using a vb script, can a cell be marked somehow to indicated in the vb code that the plotted data is invalid? I'll probaby have to checkout a book from the library.
Attached Files
File Type: xls forum_example.xls (53.0 KB, 5 views)
Reply With Quote
  #4  
Old 09-03-2008, 03:31 PM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Moderator
 
Join Date: 10 May 2004
Location: Essex, UK
Posts: 2,303
Andy Pope will become famous soon enough Andy Pope will become famous soon enough
If you do not want to use additional series coding is the only way.

Code:
Sub ColourMarkers(MySeries As Series, CheckData As Range)

    Dim pntTemp As Point
    Dim lngIndex As Long
    
    On Error GoTo ErrColorMarkers
    
    For Each pntTemp In MySeries.Points
        lngIndex = lngIndex + 1
        If CheckData.Cells(lngIndex).Interior.ColorIndex <> xlNone Then
            pntTemp.MarkerBackgroundColorIndex = CheckData.Cells(lngIndex).Interior.ColorIndex
        End If
    Next
    
ErrColorMarkers:
    Exit Sub
    
End Sub

Sub Main()
    
    Dim rngChart As Range
    
    For Each rngChart In Worksheets("Loads").Range("A5:A9")
        ColourMarkers Charts(rngChart.Value).SeriesCollection(1), rngChart.Offset(0, 1).Resize(1, 224)
    Next
End Sub
Notice the effect settng individual points has on a legend with only 1 series.
Although the series is actual redundent with only 1 series, unless you add another dummy series to explain the colour variation in markers.
Attached Files
File Type: xls 654419.xls (83.0 KB, 3 views)
__________________
Cheers
Andy
Reply With Quote
  #5  
Old 09-08-2008, 02:06 PM
mstrnoob mstrnoob is offline
Registered User
 
Join Date: 02 Sep 2008
Location: Planet Earth
Posts: 3
mstrnoob is on a distinguished road
Okay cool. Thank you for being very helpful. It is nice to see in the different marker colors in the plot. I have also checked out some excel scripting books to better understand how to create and run scripts.
Reply With Quote
Reply

Bookmarks

Tags
data types , graphing , plotting

New topics in Excel Charting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract and summarize from 100 worksheets into one HMIExcel08 Excel Miscellaneous 6 06-23-2008 11:08 AM
Re-formatting data... Vertical column to horizontal rows phillija Excel General 2 02-14-2008 05:02 PM
automatically move left one cell after data input by scanner. dgbillings Excel Programming 2 01-23-2008 07:46 PM
Data and number manipulation Mwhite Excel Programming 1 06-13-2007 05:15 PM
Need to extract random data using set criteria... dance621 Excel Programming 1 09-14-2006 07:03 AM


All times are GMT -4. The time now is 04:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0