Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is no easy way to do that. I think you would have to do some
intensive API work that identifies the color of the pixel on the screen, then identifies which cell is at that pixel. Why not draw the circles using the drawing toolbar. -- Regards, Tom Ogilvy "ntegrat61" wrote in message ... Can I make Excel relate a color in a picture to a cell? First, I scanned into my computer hollow circles that were hand drawn. Then, I filled them with red paint in Microsoft Paint. Then, I imported the picture into Microsoft Excel two different ways: 1) to the background, and 2) to the foreground. I want to count every cell that contains red paint. I am using this VBA function: Function CountByColor(InputRange As Range, ColorRange as Range) As Long Dim cl As Range, TempCount As Long, ColorIndex As Integer ColorIndex = ColorRange.Cells(1, 1).Interior.ColorIndex TempCount = 0 For Each cl In InputRange.Cells If cl.Interior.ColorIndex = ColorIndex Then TempCount = TempCount + 1 End If Next cl Set cl = Nothing CountByColor = TempCount End Function However, Microsoft Excel recognizes every cell as being blank in both cases. (That is, when the picture is in the background or foreground.) Can I make Excel relate a color to a cell? Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic background image in Excel? | Excel Discussion (Misc queries) | |||
Excel background image | Excel Discussion (Misc queries) | |||
Size of the background image? | Excel Discussion (Misc queries) | |||
image as a spreadsheet background | Excel Discussion (Misc queries) | |||
Export the worksheet background image as an image file - possible? | Excel Programming |