Sub Macro1()
For Each c In Worksheets("Foglio1").Range("A1:Z100") If c.Value <> "" Then c.Interior.ColorIndex = c.Value Next End Sub