View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Give a value to the color of a cell

I'm sure you have a grander plan in mind, but per your example.......

Sub enter_1()
If Range("B6").Interior.ColorIndex = 6 Then
Range("E6").Value = 1
End If
End Sub

Post back with the rest of the details for a more complete reply.


Gord Dibben MS Excel MVP


On Fri, 6 Feb 2009 07:34:08 -0800, Cassie <Cassie
wrote:

I have this same issue. The background color is manually applied. My
example is if cell B6 is yello - I want 1 to populate in E6.

Can you tell me how to do the VBA function to achieve that?

Thanks