Search a variable range based on cell address

GColeman

New Member
Joined
Feb 16, 2016
Messages
34
Office Version
  1. 2016
Platform
  1. Windows
The formula or process I'm looking for can't be as hard as I'm making it. Basically I have 2 columns of numbers. I want to search the right column for the first time a value over 70 occurs. If that occurs in D8, then I want to search above that point in C, so C3:C8 to see if a 0 occurs. If 70 is first found in D10, then search C3:C10 to see if there is a 0. Just looking to see if the left column has a 0 before the right column exceeds 70. True/False. In the example provided, there is a 0 C5 so I should get a result of "True". Seems simple, but I can't make it work.
Now, in my case, the right side is cumulative, so D4=D3+C4., and D5=D4+C5 (with some additional criteria). I could get away with seaching D3:D16 for consecutive identical numbers greater than 70.
Any help is appreciated.
 

Attachments

  • Search for 70.JPG
    Search for 70.JPG
    30.4 KB · Views: 7

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I know my data doesn't fit with this ..
the right side is cumulative,
.. but see if it does what you want anyway.
It wasn't clear whether there will always be a zero somewhere in the left column or not.
It also wasn't clear whether there will always be a >70 value in the right column or not.
So I have tried to allow for all those possibilities.

24 02 19.xlsm
CDEFGHIJKLMNOPQRSTU
1
20 before 70 exceeded?0 before 70 exceeded?0 before 70 exceeded?0 before 70 exceeded?
31010TRUE1010FALSE1010FALSE1010TRUE
41424142414241424
5024142414241424
61438143814241424
71250125014241424
81262126212241224
91274127412241224
101286128612241224
111298129812241224
12121101211012241224
13101201012010241024
14012001201224024
15121321213212241224
16121441214412241224
0 before 70 exceeded
Cell Formulas
RangeFormula
F3,U3,P3,K3F3=COUNTIF(C3:INDEX(C3:C16,IFNA(MATCH(TRUE,D3:D16>70,0),ROWS(C3:C16))),0)>0
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Thank you. I was definately overthinking it. Both answers worked, but the second one from Peter_SSs was more compact.
And I appreciate the variables built in. Yes, column D will always exceed 70, no, column C will not always have a 0.
 
Upvote 0
Yes, column D will always exceed 70, no, column C will not always have a 0.
In that case the formula can be simplified to this

24 02 19.xlsm
CDEFGHIJKLMNOP
1
20 before 70 exceeded?0 before 70 exceeded?0 before 70 exceeded?
31010TRUE1010FALSE1010FALSE
4142414241424
502414241424
6143814381438
7125012501250
8126212621262
9127412741274
10128612861286
11129812981298
12121101211012110
13101201012010120
140120012012120
15121321213212132
16121441214412144
0 before 70 exceeded
Cell Formulas
RangeFormula
F3,P3,K3F3=COUNTIF(C3:INDEX(C3:C16,MATCH(TRUE,D3:D16>70,0)),0)>0
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,986
Members
452,541
Latest member
haasro02

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