Daxton A.
02-15-2018, 04:22 PM
I'm just having fun. What I am doing is trying to get all 16,777,216 colors (256 x 256 x 256)
to show up, but it stops posting my colors after it formats cell # 65,282...gives me an error
stating that there are too many formats. Anyone know a work around because I can highlight
all 65,282 cells and copy and paste them and it does not seem to have a problem.
(Excel 2010) :thumb
P.S. My RAM only allows me to have a row count of 1,048,568 cells, I understand I would
have to restart my loops several times to get all 16,777,216 colors but that's later down the
road.
Dim i As Double 'I used the Double format bc it was large enough.
Dim j As Double '(This was originally formatted Long)
Dim k As Double
Dim l As Double
'**************************************************************************
'Name: Daxton Allen
'Purpose: This Macro automatically shows you all of the colors.
'Date: 02-15-1018
''************************************************************************* *
Application.DisplayAlerts = False
Application.ScreenUpdating = False
i = 0
j = 0
k = 0
l = 1
'.Color(0 - 255,0,0) = .ColorIndex 1 - 256
'.Color(0 - 255,0 - 255,0) = .ColorIndex 257 - 65,536
'.Color(0 - 255,0 - 255,0 - 255) = .ColorIndex 65,537 - 16,777,216
For i = 1 To 255
Range("D" & (l + 9)).Interior.Color = RGB(i - 1, 0, 0)
Range("E" & (l + 9)) = "(" & l - 1 & ", 0 , 0)"
l = l + 1
For j = 1 To 255
Range("D" & (l + 9)).Interior.Color = RGB(i - 1, j - 1, 0)
Range("E" & (l + 9)) = "(" & l - 1 & ", 0 , 0)"
l = l + 1
For k = 1 To 255
Range("D" & (l + 9)).Interior.Color = RGB(i - 1, j - 1, k - 1)
Range("E" & (l + 9)) = "(" & l - 1 & ", 0 , 0)"
l = l + 1
Next k
Next j
Next I
to show up, but it stops posting my colors after it formats cell # 65,282...gives me an error
stating that there are too many formats. Anyone know a work around because I can highlight
all 65,282 cells and copy and paste them and it does not seem to have a problem.
(Excel 2010) :thumb
P.S. My RAM only allows me to have a row count of 1,048,568 cells, I understand I would
have to restart my loops several times to get all 16,777,216 colors but that's later down the
road.
Dim i As Double 'I used the Double format bc it was large enough.
Dim j As Double '(This was originally formatted Long)
Dim k As Double
Dim l As Double
'**************************************************************************
'Name: Daxton Allen
'Purpose: This Macro automatically shows you all of the colors.
'Date: 02-15-1018
''************************************************************************* *
Application.DisplayAlerts = False
Application.ScreenUpdating = False
i = 0
j = 0
k = 0
l = 1
'.Color(0 - 255,0,0) = .ColorIndex 1 - 256
'.Color(0 - 255,0 - 255,0) = .ColorIndex 257 - 65,536
'.Color(0 - 255,0 - 255,0 - 255) = .ColorIndex 65,537 - 16,777,216
For i = 1 To 255
Range("D" & (l + 9)).Interior.Color = RGB(i - 1, 0, 0)
Range("E" & (l + 9)) = "(" & l - 1 & ", 0 , 0)"
l = l + 1
For j = 1 To 255
Range("D" & (l + 9)).Interior.Color = RGB(i - 1, j - 1, 0)
Range("E" & (l + 9)) = "(" & l - 1 & ", 0 , 0)"
l = l + 1
For k = 1 To 255
Range("D" & (l + 9)).Interior.Color = RGB(i - 1, j - 1, k - 1)
Range("E" & (l + 9)) = "(" & l - 1 & ", 0 , 0)"
l = l + 1
Next k
Next j
Next I