How to get color to fire an event code?

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Thanks for the reply. I understand it doesn't fire a code. Is their a macro that can make this work? I found this one on the internet but don't know enough about macros to see if it works. Please help. Thanks

Sub mahdi()

If Sheet1.Cells(1, 1).Interior.ColorIndex = 3 Then 'Red Color
Sheet1.Cells(1, 1).Value = 1
End If

If Sheet1.Cells(1, 1).Interior.ColorIndex = 10 Then 'Green Color
Sheet1.Cells(1, 1).Value = 2
End If

End Sub
 
Upvote 0
That will change the value of A1 depending on the fill color. It doesn't work automatically - you have to run the macro.

Perhaps explain what exactly you are trying to do.
 
Upvote 0
I'm trying to track requirements for a bunch of people (military). My spreadsheet basically has members down the side with tasks along the top. We are filling cells for members as they complete the tasks. I would like to get percentages of completion by member and by task, but I can't because there is no value to average when you use a color. An alternate would be to use an X and have a value for it. Is that possible? Thanks
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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
Back
Top