How many days a number has been negative

Pault22

New Member
Joined
Jun 21, 2010
Messages
26
Hi, I'm self tought in Excel

I have a sheet of prices going back 30 days, the prices change everyday, some numbers are negative and some are positive.
I want to know, if a number is negative, how many consecutive days, up until today (current day) has it been negative for?


Thanks for the help
Paul
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi,

Assuming your prices are in Col A to Col AD.

=COUNTIF(A1:AD1,"<"&0)

Hope this helps.
 
Upvote 0
Hey, thanks for your reply

but that seems to just give me the amount of negative numbers in the whole row of numbers.
Here's what i'm trying to do: take this row of numbers:

-5, -8, -4, 3, 9, 6, 3, 8, 8, -2, -4, -8, -9

Now the row is full of negative & positive numbers (and my sheet usually patterns like that - few days will be negative, then few days positive)

I want to kno if the numbers are negative, How many days have they been negative for? therefore 3 days in the above example.

Thanks alot
Paul
 
Upvote 0
In your post, there are 7 numbers that are negative. How did you say 3 days are negative?
 
Upvote 0
I only want to know what the latest, consecutive number of negative days is. Not how many negative days in total there are.

It's for my work (and there's alot of other factors first), but If i see that 1 of todays number's is negative - it plays a big role how long that number has been negative for (ie: how many days has this number been negative for)

So in the above row it's just the latest string of consecutive negative numbers = 3 days have been negative
 
Upvote 0
sorry - i dont know if i've explained this right?
This might be better:

21 June 20 June 19 June 18 June 17 June 16 June 15 June 14 June
-3 -2 -8 5 4 3 -5 -8


If todays 21st June - How long's the row been negative for: 3 days (incl 21st)

So, firstly, only if the number's negative - then I want to know how long has it been negative for.
 
Upvote 0
Try,

Excel Workbook
BCDEFGHIJKLMN
1-5-8-4396388-2-4-8-9
2
33
Sheet1
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,400
Members
449,156
Latest member
LSchleppi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top