On 07/04/2011 01:34 PM, RA Brown wrote:
James wrote:
I want to put an 'x' in Calc cells based on whether another cell's date
(totalincoming) is larger than a different cell's value.
I started this macro but is there an easier way?
How do I set a cell's value?


REM  *****  BASIC  *****

' put an 'x' in cells where totalincoming (06:41:45) is greater or equal
to flatrateincoming (06:36)
Sub Main( totalincoming As Date, flatrateincoming as Date )
     Option Explicit
     dim cellcontents as string

     If totalincoming>= flatrateincoming Then
         cellcontents = "x"
     End If

     ' set current cell's value

End Sub
Being a bit nit-picky here.  This that a date or time?  There is a
difference.
Ummm, well, that kind of depends. Date and time are represented as a floating point number. The integer portion represents the date, and the fractional portion represents the time. Although one might argue that a time only value has the date portion set to zero, but, that represents a very specific date. Also, setting the time portion to 0, also happens to correspond to a valid time value.

So, if you state that it is a time value only, this means that you simply assume it to be true (kind of sort of).

I know, only the Mathematicians and some of the physicists and some number of engineers agreed with me.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

Reply via email to