Hi,
I'm sure this is really simple but I just can't get the syntax right and google has not come to my aid.
I have some code which compares the value in a cell to a timeserial value to determine if the time is before or after 4pm them asigns the result to a boolean variable (true or fasle).
I want to alter the code to compare to another cell value rather than a hardcoded time serial (ultimately for a bit of future proofing to allow the users to change the '4pm' value if need be.
The first line of the If statement below is what I have at the moment which doesn't work and the Esleif line is as it was before which works - just so you can see what I mean:
I've tried .value, encasing in TimeValue, etc, but can't get it quite right. The value in the first cell is 0.4652777...778 and in the named range 0.666666...667 (checked in the imediate window) so not sure why it can't compare them...![]()
Please Login or Register to view this content.
Any help appreciated, as always. TC
Bookmarks