Selecting > Value Data based upon Flags (1's or 2's)

Mike Slattery

Board Regular
Joined
Dec 11, 2004
Messages
101
I have three columns. The first is detecting and flagging if the price is coming from a Resistance Turning Point (1) or a Support Turning Point (2). A blank cell indicates that the price for the day did not occur at a turning point. The result of this exercise is designed to return/display a Zig Zag chart of High/Low points at Turning Points or support and resistance. The problem is there are points in the data where multiple tops (1's) or multiple bottoms (2's) are detected. This is not a mistake, but what is transpiring in the data. I need to be able to detect when a (1) is followed by another (1) and select the data point that contains the higher price (Col DG) of the two. I need to accomplish the same function for when two (2's) are encountered. If a (1) is followed by a (2) or a (2) is followed by a (1) no action is necessary.

Grateful for any suggestions, Thanks Michael

Setup below:

The formulas in the three columns are below:
DF: =IF(CN3>CW3,1,IF(CW3>CN3,2,""))

DG: =IF(CN3>CW3,CN3,IF(CW3>CN3,CW3,#N/A))

DH: =IFERROR(IF(DG3>0,CA3),"")

Data in Columns DF, DG, DH.

DF___DG ______DH_____
#N/A
#N/A
1 15.76 01 06 14
#N/A
#N/A
#N/A
#N/A
#N/A
#N/A
2 15.1 12 24 13
#N/A
#N/A
#N/A
2 15.17 12 18 13
1 16.99 12 17 13
#N/A
#N/A
#N/A
#N/A
#N/A
#N/A
#N/A
#N/A
#N/A
1 17.2 12 03 13
1 17.2 12 02 13
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,215,417
Messages
6,124,791
Members
449,188
Latest member
Hoffk036

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top