LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Why does blank text equal 0?

Looks like it works in VBA, but I've never used it in a practical application
so I don't know what limitations or pitfalls may exist. In VBA, however,
TRUE = -1, which may be what prompted the OP's question:

What does the "--" mean? Does that convert TRUE from -1 to 1?


Sub test()
x = --IsNumeric(5)
MsgBox x
End Sub


"Biff" wrote:

SUMPRODUCT seems like an easy way to handle multiple conditions with
out getting into arrays.


Yes, it is. Sumproduct is extemely useful and versatile.

What does the "--" mean? Does that convert TRUE from -1 to 1?


Yes, but it's a 2 step process. -TRUE = -1 then --1 = 1. Basically, it
converts TRUE to 1 and FALSE to 0.

Can "--" used in other formulas / VBA?


I'm not sure about VBA but it can be used in any formula where you need/want
to convert TEXT numbers/logicals into NUMERIC values.

See this for a detailed explanation:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Biff

wrote in message
oups.com...
Yes, the "502" is actually a text field.

SUMPRODUCT seems like an easy way to handle multiple conditions with
out getting into arrays.

What does the "--" mean? Does that convert TRUE from -1 to 1? Can
"--" used in other formulas / VBA?

Thanks!




 
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
Multiple formatting in text cell blank it out! Tom Excel Discussion (Misc queries) 0 August 1st 06 10:34 AM
How change dimensions of data label text box in pie chart? Gouden Willem Charts and Charting in Excel 3 March 7th 06 12:11 PM
Capitalize Text if 2 lists are equal elevdown New Users to Excel 5 December 15th 05 03:56 PM
How do I clear blank space at the top of a word-wrapped text cell? mirage1210 Excel Discussion (Misc queries) 2 February 11th 05 09:19 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 12:46 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"