Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
suzie
 
Posts: n/a
Default How do I count crossing zero in a column of integers?

I have a very long column of data which moves from positive to negative. I
want to count the occasions where it crosses zero, but am having trouble
writing a formula for this condition. Is there a way I can automatically
compare consecutive cells in the column to identify whether it has changed
from negative to positive?
  #2   Report Post  
Posted to microsoft.public.excel.misc
MartinW
 
Posts: n/a
Default How do I count crossing zero in a column of integers?

Hi Suzie,

One way is to use conditional formatting. Select your entire row and set
condition 1 If cell value is less than zero format blue
condition 2 If cell value is greater than zero format red

HTH
Martin


  #3   Report Post  
Posted to microsoft.public.excel.misc
suzie
 
Posts: n/a
Default How do I count crossing zero in a column of integers?



"MartinW" wrote:

Hi Suzie,

One way is to use conditional formatting. Select your entire row and set
condition 1 If cell value is less than zero format blue
condition 2 If cell value is greater than zero format red

HTH
Martin


Thanks Martin. Now I can clearly differentiate between them, but can't get my head around how I would go about counting the changes (other than manually, which would be very time consuming). Is it possible to do this in Excel?

cheers,
Suzie
  #4   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default How do I count crossing zero in a column of integers?

If you values start in A1 going down A25 you can put this in B2 and copy
down along

=AND(A10,A2<0)

will return TRUE when a value changes from 0 to <0

to count it

=SUMPRODUCT(--(A1:A240),--(A2:A25<0))

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"suzie" wrote in message
...
I have a very long column of data which moves from positive to negative. I
want to count the occasions where it crosses zero, but am having trouble
writing a formula for this condition. Is there a way I can automatically
compare consecutive cells in the column to identify whether it has changed
from negative to positive?



  #5   Report Post  
Posted to microsoft.public.excel.misc
suzie
 
Posts: n/a
Default How do I count crossing zero in a column of integers?

Thank you... that has worked well!

"Peo Sjoblom" wrote:

If you values start in A1 going down A25 you can put this in B2 and copy
down along

=AND(A10,A2<0)

will return TRUE when a value changes from 0 to <0

to count it

=SUMPRODUCT(--(A1:A240),--(A2:A25<0))

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"suzie" wrote in message
...
I have a very long column of data which moves from positive to negative. I
want to count the occasions where it crosses zero, but am having trouble
writing a formula for this condition. Is there a way I can automatically
compare consecutive cells in the column to identify whether it has changed
from negative to positive?




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
parsing text in a multiple column count JK57 Excel Worksheet Functions 3 April 13th 06 11:03 AM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM


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