Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Color Chart using offset


I have used this code from a previous posting and it works great. Now
need a little help with an enhancement. The code is:

Sub ColorColumns()

Dim vntValues As Variant
Dim intSeries As Integer
Dim intPoint As Integer

With ActiveChart
For intSeries = 1 To .SeriesCollection.Count
With .SeriesCollection(intSeries)
vntValues = .Values
For intPoint = 1 To .Points.Count
If vntValues(intPoint) < 3 Then
' red column
.Points(intPoint).Interior.Color = _
RGB(255, 0, 0)
ElseIf vntValues(intPoint) 8 Then
' green column
.Points(intPoint).Interior.Color = _
RGB(0, 255, 0)
End If
Next
End With
Next
End With

End Sub

My data was all in column A and varied in length. Now I am adding tw
more columns B&C. I would like to color chart column using red an
green as in the above example. The data in A would still be plotted
but the color of the bar would turn color based on a comparison betwee
B and C. B < C = RED, B C =GREEN. My guess would be to use Offset
but not sure were to start.

Thank

--
czywr
-----------------------------------------------------------------------
czywrg's Profile: http://www.excelforum.com/member.php...fo&userid=3105
View this thread: http://www.excelforum.com/showthread.php?threadid=50723

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
Using offset in series values of a chart Beertje Charts and Charting in Excel 1 October 10th 07 06:50 PM
Dynamic chart, OFFSET, #N/A Help sahafi Charts and Charting in Excel 13 April 30th 07 09:30 PM
Is there a way to offset the y-axis of a chart without having the. SWeyer Charts and Charting in Excel 1 November 30th 04 03:35 AM
Need to use an offset for x-axis in chart/graph melisfreed[_5_] Excel Programming 1 November 15th 04 03:19 PM
Need to use an offset for x-axis in chart/graph melisfreed[_4_] Excel Programming 1 November 15th 04 02:18 PM


All times are GMT +1. The time now is 09:32 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"