Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
FLKULCHAR
 
Posts: n/a
Default How do I add consecutive numbers but start over at break in the.

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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Take a look he

http://www.mcgimpsey.com/excel/doubleneg.html

In article ,
FLKULCHAR wrote:

what is the meaning of...=--

  #3   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

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   Report Post  
FLKULCHAR
 
Posts: n/a
Default

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
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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
How do I add consecutive numbers but start over at a break in the. Hockley Excel Discussion (Misc queries) 1 December 24th 04 05:11 PM
How do I add consecutive numbers but start over at a break in the. hockleyc Excel Discussion (Misc queries) 0 December 24th 04 04:15 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM
Inventory numbers - Consecutive, but out of sequence crazybass2 Excel Discussion (Misc queries) 4 December 7th 04 12:49 AM


All times are GMT +1. The time now is 02:34 AM.

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

About Us

"It's about Microsoft Excel"