View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Function to Place Value in Specified Cell

Craig,

Functions can only change the value of the cell they are called by:
everything else is ignored.

Put a formula in F23:

=IF(F2210,"BUY","SELL")

HTH,
Bernie
MS Excel MVP

"Craig Bender" wrote in message
...
This should be real easy, but I having difficulty. I want a function that
places a value in another cell. An example use might be like:
=IF(F2210,SetCellVal(F23,"BUY"),SetCellVal(F23,"S ELL")).

Though, I tried a dozen or so variations it presently looks like:

Function SetCellVal(targe_cell As Range, target_value As String)

'Set Cell to Value
target_cell.Value = target_value

End Function

I guess its more than a one liner.

In advance Thanks for any Help given.

Craig.