Help needed

mrmike123

New Member
Joined
Apr 29, 2020
Messages
2
Office Version
  1. 2016
  2. 2013
  3. 2011
Platform
  1. Windows
Hi. First time posting here and hopefully someone will have the solution to my question. I have 2 columns of data. Column A has a 3 digit number, example, .468, .523, etc. In column B, it is either yes or no. Column A represents a numeric value for a test, and column B is whether the test was positive or negative. THe file has over 500 lines. What Im looking for is a way to find which range has the highest % of yes returns. Please see below. Since the file is 500 + lines, Id like to be able to find, lets say which 40 period range has the most yes values. THen Id like to be able to change the range to say 50 data points. Is there a way in solver, what if analysis or a formula which can be used which will allow a different # of ranges? Perhaps if the yes and no are changed to numberic values, that may also be something which would help. Thanks in advance to anyone willing to assist here.
Col A Col B
.456 NO
.485 Yes
.492 Yes
.496 Yes
.499 No
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You might try something like this. I added a column A for an index if you want to later report the index associated with the max value.
Book1
ABCDEF
1idxvalueoutcome#"Yes"range -->6
210.456No Max # Yes5
320.485Yes 
430.492Yes 
540.496Yes 
650.499No 
760.487Yes4
870.491Yes5
980.499Yes5
1090.485No4
11100.477No3
12110.499No3
13120.499No2
14130.485Yes2
15140.48No1
16150.499No1
17160.467Yes2
18170.499Yes3
19180.453No3
20190.495No2
21200.499Yes3
Sheet2
Cell Formulas
RangeFormula
F2F2=MAX(D2:D21)
D2:D21D2=IF(A2<$F$1,"",COUNTIF(OFFSET(C2,,,-$F$1,),"Yes"))
 
Upvote 0
Kirk: Thanks very much for the quick reply. This is what I was looking for. I have one other bit of info needed, but I have no issue getting that. It was the offset portion of what you posted that greatly helped. Appreciate it!!
 
Upvote 0
You're welcome...glad to help. Welcome to the forum!
 
Upvote 0

Forum statistics

Threads
1,215,693
Messages
6,126,237
Members
449,304
Latest member
hagia_sofia

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