Wpis z mikrobloga

Cześć, mam pytanie- jak zmienić kolor komórki za pomocą funkcji?

Takie coś działa mi bez problemu:

Sub cc()
Range("A1").Interior.ColorIndex = 20
End Sub

Ale takie coś ni cholery nie chce:

Function cl(col As String)
Range("A1").Interior.ColorIndex = 7
cl = col
End Function

WTF?

#vba #excel
  • 9