need to create dynamic chart based on color of cells

divuraj

Board Regular
Joined
Sep 28, 2006
Messages
75
Hi,

I have my values in last column which is also dynamically increasing week on week. i have the last column value already and now i need to check whether there any values in red and need to create line graph only for values which are in red for the last 12 weeks.

this is the code which i have used , i have code before this as well. am i going wrong somewhere, this code does not give any msg box which i have written just to check. i have conditional fomratting in the range and cell BH11 and BH14 are in red.

Range(Selection, Selection.End(xlUp)).Select

Range(Selection, Selection.End(xlUp)).Select
Selection.End(xlDown).Select

cel4 = ActiveCell.Row
j = ActiveCell.Column
For i = 2 To cel4

If Cells(i, j).Interior.ColorIndex = 3 Then
msgbox "success"
End If

Next


please help...

Thanks,
divuraj.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,191,025
Messages
5,984,203
Members
439,878
Latest member
melodysc

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top