Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using offset in series values of a chart | Charts and Charting in Excel | |||
Dynamic chart, OFFSET, #N/A Help | Charts and Charting in Excel | |||
Is there a way to offset the y-axis of a chart without having the. | Charts and Charting in Excel | |||
Need to use an offset for x-axis in chart/graph | Excel Programming | |||
Need to use an offset for x-axis in chart/graph | Excel Programming |