LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Function Required

I have a 2,000 row column (A) that contains either positive or negative
numbers.
In an adjacent column (B) I need a user defined function in each row which
counts how many rows preceding the active row in Column A contain unbroken
strings of either positive (or negative) numbers.
So for example the function in cell B2000 would determine that A2000 was,
say, positive, and then return a value that counted how many consecutive
cells preceding A2000 were also positive, before changing to negative.
I am sure I could, eventually, come up with some VBA code that looped until
while counting, but would find a Function much more useful.
As always, all suggestions and assistance will be much appreciated.
MichaelC
 
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
If function required Ravi Excel Discussion (Misc queries) 5 October 21st 08 01:09 PM
Function required Padraig Excel Discussion (Misc queries) 1 November 6th 07 05:40 PM
add OR to already nested If function - help required N E Body Excel Worksheet Functions 3 November 12th 06 02:43 AM
Function not working quite as required Harald Staff[_5_] Excel Programming 1 September 15th 03 03:45 PM
Function not working quite as required Bob Phillips[_5_] Excel Programming 1 September 15th 03 01:43 PM


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

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"