View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default counting number of times value is greater than previous week

Assuming that A1:AZ1 contains your data, try...

Upward:

=SUMPRODUCT(--(B1:AZ1A1:AY1))

Downward:

=SUMPRODUCT(--(B1:AZ1<""),--(B1:AZ1<A1:AY1))

Hope this helps!

In article ,
tereasajw wrote:

Need to be able to count the number of times the value is greater than the
previous week value in a row of numbers:
15, 13, 15, 14, 16, 17, 18
This would show a 4 as in for 4 weeks we were on an upward trend.

Then have to do the reverse for downward trends - on the same row of numbers.
15, 13, 15, 14, 16, 17, 18, 15, 14, 13
say 3 weeks later this would show downward trend for 3 weeks.

Could be 2 separate formulas. Any help would be appreciated - using a
massive if statment right now that only allows me to go back about 6 weeks -
so if the trend last longer than 6 weeks, I keep showing a 6 for the
following weeks. Trying to stay away from macros if possible.