Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Recently, the following question was posed by another party:
"How do I add consecutive numbers but start over at a break in them. I'm trying to calculate consecutive days of attendance. One might have had 20 days in a row missed one and then I need to start over." The rsvp was: You received an answer... In B1 enter: =--(A10) In B2 enter: =(A20)*(1+B1) and drag down to copy as needed My question is: What does =--(A10) mean? i.e. what is the meaning of...=-- ?? Regards, FL KULCHAR |
#2
![]() |
|||
|
|||
![]()
Take a look he
http://www.mcgimpsey.com/excel/doubleneg.html In article , FLKULCHAR wrote: what is the meaning of...=-- |
#3
![]() |
|||
|
|||
![]()
FL,
What does =--(A10) mean? First of all, the expression A10 is a boolean expression. A1 is either greater than 0, or it isn't. So the expression resolves to TRUE or FALSE. If you select this part of the formula and press F9, it will evaluate it for you, putting in TRUE or FALSE. Press Esc, not Enter, to keep the formula from being permanently changed. If we want 0 instead of FALSE, or 1 instead of TRUE, we use --, double negation, which forces Excel to treat the (A10) expression as a number. We say it coerces it from it's current data type (boolean) to a number. The second - did that (the one directly in front of the (A10) expression), and the first brought it back to the original sign, + or -. You can get the same result with =(A10)+0. It has to coerce the (A10) to numeric before it can add the zero. Or =(A10)*1. The double negation is probably the most universally used and recognized. The parentheses are necessary because the rules of precedence would otherwise cause the -- (actually only the second one) to apply only to the A1 term, instead of the expression A10. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "FLKULCHAR" wrote in message ... Recently, the following question was posed by another party: "How do I add consecutive numbers but start over at a break in them. I'm trying to calculate consecutive days of attendance. One might have had 20 days in a row missed one and then I need to start over." The rsvp was: You received an answer... In B1 enter: =--(A10) In B2 enter: =(A20)*(1+B1) and drag down to copy as needed My question is: What does =--(A10) mean? i.e. what is the meaning of...=-- ?? Regards, FL KULCHAR |
#4
![]() |
|||
|
|||
![]()
To Earl:
Thank you for your RSVP: your eloquence and your illustrious knowledge certainly answered my question...THANK YOU VERY MUCH. --FL Kulchar*1 "Earl Kiosterud" wrote: FL, What does =--(A10) mean? First of all, the expression A10 is a boolean expression. A1 is either greater than 0, or it isn't. So the expression resolves to TRUE or FALSE. If you select this part of the formula and press F9, it will evaluate it for you, putting in TRUE or FALSE. Press Esc, not Enter, to keep the formula from being permanently changed. If we want 0 instead of FALSE, or 1 instead of TRUE, we use --, double negation, which forces Excel to treat the (A10) expression as a number. We say it coerces it from it's current data type (boolean) to a number. The second - did that (the one directly in front of the (A10) expression), and the first brought it back to the original sign, + or -. You can get the same result with =(A10)+0. It has to coerce the (A10) to numeric before it can add the zero. Or =(A10)*1. The double negation is probably the most universally used and recognized. The parentheses are necessary because the rules of precedence would otherwise cause the -- (actually only the second one) to apply only to the A1 term, instead of the expression A10. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "FLKULCHAR" wrote in message ... Recently, the following question was posed by another party: "How do I add consecutive numbers but start over at a break in them. I'm trying to calculate consecutive days of attendance. One might have had 20 days in a row missed one and then I need to start over." The rsvp was: You received an answer... In B1 enter: =--(A10) In B2 enter: =(A20)*(1+B1) and drag down to copy as needed My question is: What does =--(A10) mean? i.e. what is the meaning of...=-- ?? Regards, FL KULCHAR |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
How do I add consecutive numbers but start over at a break in the. | Excel Discussion (Misc queries) | |||
How do I add consecutive numbers but start over at a break in the. | Excel Discussion (Misc queries) | |||
Sorting when some numbers have a text suffix | Excel Discussion (Misc queries) | |||
Inventory numbers - Consecutive, but out of sequence | Excel Discussion (Misc queries) |