Hi,

Actually what I need is something like this,

```
dim cd as string
cd=me.Cell(row,0)
cd=cd.Right(1)
Select case cd
case "1"
if column=0 then g.foreColor=rgb(255, 0, 0)
if column=1 then g.foreColor=rgb(255, 0, 0)
if column=2 then g.foreColor=rgb(255, 0, 0)
case "2"
if column=0 then g.foreColor=rgb(26, 32, 232)
if column=1 then g.foreColor=rgb(26, 32, 232)
if column=2 then g.foreColor=rgb(26, 32, 232)
case "3"
if column=0 then g.foreColor=rgb(163, 3, 158)
if column=1 then g.foreColor=rgb(163, 3, 158)
if column=2 then g.foreColor=rgb(163, 3, 158)
case "4"
if column=0 then g.foreColor=rgb(145, 145, 0)
if column=1 then g.foreColor=rgb(145, 145, 0)
if column=2 then g.foreColor=rgb(145, 145, 0)
case "5"
if column=0 then g.foreColor=rgb(0, 148, 148)
if column=1 then g.foreColor=rgb(0, 148, 148)
if column=2 then g.foreColor=rgb(0, 148, 148)
case "6"
if column=0 then g.foreColor=rgb(10, 173, 24)
if column=1 then g.foreColor=rgb(10, 173, 24)
if column=2 then g.foreColor=rgb(10, 173, 24)
case "7"
if column=0 then g.foreColor=rgb(68, 62, 77)
if column=1 then g.foreColor=rgb(68, 62, 77)
if column=2 then g.foreColor=rgb(68, 62, 77)
case "8"
if column=0 then g.foreColor=rgb(158, 58, 0)
if column=1 then g.foreColor=rgb(158, 58, 0)
if column=2 then g.foreColor=rgb(158, 58, 0)
case "9"
if column=0 then g.foreColor=rgb(1, 86, 110)
if column=1 then g.foreColor=rgb(1, 86, 110)
if column=2 then g.foreColor=rgb(1, 86, 110)
end select
```

but I need the backcolor/forecolor is paint automatically by using random color without defining the color manually.

I need every different row criteria automatically paint using random color method.

thanks

arief