Help with Range.("XX").Value = (Newbie)
thanks for the responses. I wasted alot of time on this..
Can one of you help with the syntax for passing a few different cell values
to a calling function
Cell Call:
=compute(C1,C3,C5)
*****
function compute( ??????)
'get the value of the 3 cells and do a calculation
end function
*****
"David Andrews" wrote in message
news:V%z8i.1968$FU4.119@trndny02...
I have a function that sums 3 values:
********
Public Function sum(UserRange) As Double
sum = 0
For Each cell In UserRange
sum = sum + cell.Value
Next cell
Range("H5").Value = 7 : THIS DOESNT WORK ???
mysum = sum
End Function
******
The call for it is in a cell (G4) , =sum(G1:G3)
I am trying to set the value of another cell in this function using
Range("H5").Value = 7,but it does nothing.
|