![]() |
=SUMPRODUCT(--(TRIM(A1:A10)<"")), what does the "--" mean?
Hi,
What does the "--" operator mean in the above worksheet equation? Thanks. |
=SUMPRODUCT(--(TRIM(A1:A10)<"")), what does the "--" mean?
Google for "double unary minus".
-- David Biddulph "Ray" wrote in message ... Hi, What does the "--" operator mean in the above worksheet equation? Thanks. |
=SUMPRODUCT(--(TRIM(A1:A10)<"")), what does the "--" mean?
=SUMPRODUCT(--(TRIM(A1:A10)<""))
This portion will return an array of TRUE or FALSE: TRIM(A1:A10)<"") The double unary "--" coerces these logical values to numeric values which SUMPRODUCT can then add up to arrive at the result. --TRUE gets coerced to 1 --FALSE gets coerced to 0 Try entering these formulas and see what happens: =--TRUE =--FALSE Enter the number 10 in cell A1 then try this formula: =--(A1=10) -- Biff Microsoft Excel MVP "Ray" wrote in message ... Hi, What does the "--" operator mean in the above worksheet equation? Thanks. |
All times are GMT +1. The time now is 05:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com