ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selection based on coloured cells? (https://www.excelbanter.com/excel-programming/308359-selection-based-coloured-cells.html)

bluevortex

Selection based on coloured cells?
 
Hi all,

Is it somehow possible to make a selection based on the red colors i
attached file?

In other words; iso manually creating the sheet "Part" based on sheet
"WINS" & "CONT" can this be done automatically...

... to come to a specific list shown in sheet "Overview" :confused:


I suppose I have to make use of VBA? Please keep in mind I have n
experience in this whatsoever..

Thank you for helping me out on this one !


Regards

Attachment filename: forit.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=66343
--
Message posted from http://www.ExcelForum.com


Jim May

Selection based on coloured cells?
 
Go to http://www.cpearson.com/excel/colors.htm
for any and all answers re "working with colored-cells".
HTH

"bluevortex " wrote in message
...
Hi all,

Is it somehow possible to make a selection based on the red colors in
attached file?

In other words; iso manually creating the sheet "Part" based on sheets
"WINS" & "CONT" can this be done automatically...

.. to come to a specific list shown in sheet "Overview" :confused:


I suppose I have to make use of VBA? Please keep in mind I have no
experience in this whatsoever..

Thank you for helping me out on this one !


Regards,

Attachment filename: forit.xls
Download attachment:

http://www.excelforum.com/attachment.php?postid=663430
---
Message posted from http://www.ExcelForum.com/




bluevortex[_2_]

Selection based on coloured cells?
 
Thank you for the quick response Jim!

I presume I have to start using next function ?


Function CountByColor(InRange As Range, _
WhatColorIndex As Integer, _
Optional OfText As Boolean = False) As Long
'
' This function return the number of cells in InRange with
' a background color, or if OfText is True a font color,
' equal to WhatColorIndex.
'
Dim Rng As Range
Application.Volatile True

For Each Rng In InRange.Cells
If OfText = True Then
CountByColor = CountByColor - _
(Rng.Font.ColorIndex = WhatColorIndex)
Else
CountByColor = CountByColor - _
(Rng.Interior.ColorIndex = WhatColorIndex)
End If
Next Rng

End Function


But then? What's next ? How can I get excel automatically make a
overview based on those colored cells?
As stated before; vba is not my kind of thing...

Anyone?:confused

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com