Identify peaks and troughs in range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
If you data is in column A, then in B2 enter:
=IF(AND((A2>A1),(A2>A3)),"peak","") and copy down
In C2 enter:
=IF(AND((A2<A1),(A2<A3)),"trough","") and copy down
_________________________________________________
Gary's Student
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top