Adjust VBA macro to recognize minor change in RGB color code.
- or -
Post a project like this2007
£10(approx. $12)
- Posted:
- Proposals: 11
- Remote
- #2153765
- Awarded
Excel and VBA expert. Professional OCR. PDF to Excel Conversion. Data management, Translations English Russian
Hua Hin
Experienced Graphics designer |Experienced WordPress Full Stack|SharePoint Expert|Data Entry Team |flyer/business card/Brochure||2DAnimation||Photoshop work|
Islamabad
989841104630368447478098750797171158621677182191877228693323598252399333
Description
Experience Level: Entry
Using following macro in table to count value of cells with same color.
Function ColorFunction(rColor As Range, rRange As Range, Optional SUM As Boolean)
Dim rCell As Range
Dim lCol As Long
Dim vResult
lCol = rColor.Interior.ColorIndex
If SUM = True Then
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = WorksheetFunction.SUM(rCell, vResult)
End If
Next rCell
Else
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = 1 + vResult
End If
Next rCell
End If
ColorFunction = vResult
End Function
As 43 colours present some of the colors have only minor difference in one number of RGB code. Above macro calculates close colours together.
We need to get macro refined to enable filter to differentiate between minor colour differences.
Table attached. Aim is to establish number of operatives from below 72 sequences.
Function ColorFunction(rColor As Range, rRange As Range, Optional SUM As Boolean)
Dim rCell As Range
Dim lCol As Long
Dim vResult
lCol = rColor.Interior.ColorIndex
If SUM = True Then
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = WorksheetFunction.SUM(rCell, vResult)
End If
Next rCell
Else
For Each rCell In rRange
If rCell.Interior.ColorIndex = lCol Then
vResult = 1 + vResult
End If
Next rCell
End If
ColorFunction = vResult
End Function
As 43 colours present some of the colors have only minor difference in one number of RGB code. Above macro calculates close colours together.
We need to get macro refined to enable filter to differentiate between minor colour differences.
Table attached. Aim is to establish number of operatives from below 72 sequences.
MB T.
100% (7)Projects Completed
16
Freelancers worked with
11
Projects awarded
40%
Last project
22 Sep 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Please change code to color index to rgb
-
I understand your project please let me know can build color dashboard with count. If no so please suggest me
717254717245
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies