View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
VilMarci VilMarci is offline
external usenet poster
 
Posts: 11
Default custom function - with built-in function

Hi,

I have a small excel function that returns the background color value of a
cell:

Function ColorOfCell(cellaneve As Range)

Dim CellColor As Integer

CellColor = cellaneve.Interior.ColorIndex
ColorOfCell = CellColor

End Function

That's ok. Works from excel like =ColorOfCell(A1)
But how can I make it work to use with built-in functions?

Like:
=ColorOfCell(HLOOKUP($A$1;Personal!$B$20:$Q$51;J6; FALSE))

Is there any general solution to do this?

Marton