This macro allows you to get a color code, you can modify it to your convenience:
Sub distri_color() Dim Lign As Integer For Lign = 1 To 12 Worksheets(1).Range("C" & Lign).Value = Worksheets(1).Range("B" & Lign).Interior.Color Next Lign End Sub
- 'Replace 12 by the number of lines you want to process.
- 'Replace "C" by the column you want to use for the result (color code).
- 'Replace "B" by the column that contains the color to be filtered.
- Excel - A macro to get the equivalent numerical codes for colors
- Excel is automatically changing dates to a numeric code ✓ - Forum - Excel
- Blinking cell in excel without macro ✓ - Forum - Excel
- Excel: Sample Macro to Insert Multiple Rows - How-To - Excel
- Excel - A Macro to copy and paste data in next blank cell - How-To - Excel
- Excel - Running Macro Automatically - How-To - Excel
This document, titled « Excel - A macro to get the equivalent numerical codes for colors », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).