Trying to find the next closest date, only if the other column is "NO"

Broncosfan007

New Member
Joined
Feb 12, 2016
Messages
2
It's had to word exactly what I am trying to do, but in short I have billers in the I column, and each biller has a due date in column N, and I have whether or not the biller is paid ("YES", or "NO") in column H.

I simply want to use today's date and tell me what biller is due next, but only if the biller is not paid. So example...

If Today is 2/12/2016

H I N
NO Biller #1 2/22/2016
YES Biller #2 2/12/2016
YES Biller #3 2/17/2016
NO Biller #4 2/20/2016

So Biller #4 is the next biller due. I am just starting to learn more about Excel and I could really use help on this.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
As an array(ctrl+shft+enter):
Code:
=Index($I$1:$I$10,Match(Min(If($H$1:$H$10 = "No", $N$1:$N10,"")),$N$1:$N$10,0))
the array is "confirmed" when the formula gets brackets {} wrapped around the formula

for legibility purposes
Code:
=Index(Biller,Match(Min(If(Status = "No", Date,"")),Date,0))

Unfortunately, this is a bit complex for a beginner, but I thought I'd try to explain. Working from inside out:

if(Status = "No", Date,"")returns the dates for status's that are "no" (otherwise returns nothing)
Min(...)returns the minimum date
Match(..., Date, 0)searches for the minimum date within the array of dates, and returns the row#(within the array).
Index(Billers, ...)returns the cell value of the specified row#(from match formula) within the specified array(the list of billers)

<tbody>
</tbody>


The concept of an array formula might be a bit confusing for a first timer. But it's necessary for the "if" function at the beginning. Easiest explanation for it is that you want the if statement to output multiple values (aka an "array") of values.
 
Last edited:
Upvote 0
Row\Col
H​
I​
N​
O​
P​
1​
2/12/2016​
2​
NOBiller #1
2/22/2016​
Next Due:
3​
YESBiller #2
2/12/2016​
Biller #4
4​
YESBiller #3
2/17/2016​
Biller #6
5​
NOBiller #4
2/20/2016​
6​
NOBiller #5
2/21/2016​
7​
NOBiller #6
2/20/2016​

In P1 just enter:
Rich (BB code):
=TODAY()<strike></strike>

In P3 control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX(I$2:I$7,SMALL(IF($N$2:$N$7=MIN(IF($H$2:$H$7="no",
    IF($N$2:$N$7>=$P$1,$N$2:$N$7))),ROW($I$2:$I$7)-ROW($I$2)+1),ROWS($P$3:P3))),"")
 
Upvote 0
Thank you so much MRExcel MVP. This worked beautifully! I have been racking my brain so hard trying to figure this out, and I almost had it working, but because of the column with whether or not the biller was paid or not it kept messing me up lol.
 
Upvote 0
Thank you so much MRExcel MVP. This worked beautifully! I have been racking my brain so hard trying to figure this out, and I almost had it working, but because of the column with whether or not the biller was paid or not it kept messing me up lol.

You are welcome.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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