Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default yyyymmdd date format

As in many other languages, in VBA, when coercing numbers to a boolean
value, zero is evaluated as False, any non-zero value will be evaluated
as True.

A True value in VBA will be coerced to -1 in a math operation. In XL,
the coercion is to +1.

In article ,
"NickHK" wrote:

Rob,
The Excel v. VBA handling of booleans seems a bit screwy. Assuming A1=TRUE:

?range("A1").Value=true
True
?-range("A1").Value=true
False
?--range("A1").Value=true
True
?10*range("A1").Value
-10
?10*--range("A1").Value
-10

I can't see the logic for all the above to be valid.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I change the date format from yyyymmdd to mm/dd/yyyy Charlene Excel Worksheet Functions 5 May 6th 23 07:46 PM
Change date from yyyymmdd to valid date format denilynn Excel Discussion (Misc queries) 4 September 2nd 09 07:19 PM
How do I change date yyyymmdd to a Excel-supported date format? dan Excel Worksheet Functions 4 July 6th 08 11:05 PM
I need a yyyymmdd date format with no dashes EXCEL HELP PLEASE Excel Discussion (Misc queries) 2 December 21st 06 08:19 PM
Is there an Excel date format as follows: yyyymmdd? N Excel Discussion (Misc queries) 3 June 22nd 06 09:44 PM


All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"