View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Identify peaks and troughs in range

If you data is in column A, then in B2 enter:
=IF(AND((A2A1),(A2A3)),"peak","") and copy down
In C2 enter:
=IF(AND((A2<A1),(A2<A3)),"trough","") and copy down
_________________________________________________
Gary's Student


"James Booth" wrote:

If I have a range of data that goes up and down in value. Is there any way to
identify the cells/values where it changes from increasing to decreasing and
vice versa. I know this must be a IF statement, but I need some help. Thanks.

Example
1
2
3
4 This is a peak
3
2This is a trough
4
5
6
7
8 This is a peak
7
6
Etc.