Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
James Booth
 
Posts: n/a
Default Identify peaks and troughs in range

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.
  #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.

Reply
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



All times are GMT +1. The time now is 08:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"