nonethefewer: (Default)
Chris ([personal profile] nonethefewer) wrote2010-01-27 06:03 pm

(no subject)

I have this ass-long formula that checks invoice things.  I decided to put it into a function, and just call that function.

The cell:

=determineState()

The function (or at least some of it):

Function determineState()

rowNum = ActiveCell.Row

dateSent = Cells(rowNum, 8)
datePaid = Cells(rowNum, 10)

retVal = "I: "

' Has it been paid?
If datePaid <> "" Then
retVal = retVal & "paid"
Else
retVal = retVal & "sent"
End If

determineState = retVal

End Function


And yet, the result does not refresh well.  If at all.

What the hell?

[identity profile] australian-joe.livejournal.com 2010-01-28 02:43 am (UTC)(link)
Something I've seen and don't always understand: in the cell, try wrapping the function call in curly braces.