Link to home
Start Free TrialLog in
Avatar of bbao
bbaoFlag for Australia

asked on

How to keep previous peak or trough values for a range.

hi Excel folks,

i got an interesting requirement from a client to keep previous peak or trough values of a range of data. The peak / trough values (C) can be referred by the values (B) or its index (A). How to apply a formula for C?

for example, say if B = sin (A), then values in column B will look like a sort of wave with peaks and troughs, the column C will remain the value / index of previous peaks or troughs, as shown in the attached Excel sheet.

FYI - in the Excel sheet, I manually give first 50 values of C, just for demonstration purpose.

any thoughts?

thanks heaps,
bbao
Sinboook.xlsx
ASKER CERTIFIED SOLUTION
Avatar of D Patel
D Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bbao

ASKER

A perfect, smart solution! Thank you very much!
You are welcome!! Happy to help...