# Help with a formula to pick the next date after TODAY() date

#### jtalbour

##### New Member
Need so help with a formula that will tell me the first date of a pending PO that will arrive after todays date

Looking at the data below the date in A3 is what i am after

Any array formula that will look at the data below and if the following conditions are met
column A has dates
column b has numbers
and column c says "open" then tell me what the date is of the next open PO

Solving this is way above my abilities and any help would be great
Book2
ABCD
1DUEAMOUNTSTATUSCOST
210/23/200650OPEN20.8724
310/22/200642OPEN21.0724
410/17/200642OPEN20.8724
510/14/200684OPEN20.8724
610/10/200642CLOSED20.8724
710/7/200642CLOSED20.6499
810/3/200684CLOSED20.6825
Sheet1

### Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

##### MrExcel MVP
assuming dates greater than today occur above today's entry in the list:

=INDEX(A1:A8,MAX(IF(C1:C8="OPEN",IF(A1:A8>TODAY(),ROW(A1:A8)))))

...entered with control + shift + enter, not just enter.

#### ravishankar

##### Well-known Member
cells(1,1) = " =today()"
For a = 10 to 1
if cells(a,2) > cells(1,1) then
cells(a,2).interior.indexcolor = 6
endif
next a

I assume the dates are in column B and in decreasing order.
press Alt F8 and paste the above code and run it.

Ravi

##### MrExcel MVP
=INDEX(\$A\$2:\$A\$8,MATCH(MIN(IF(\$C\$2:\$C\$8="OPEN",IF(\$A\$2:\$A\$8>TODAY(),\$A\$2:\$A\$8,""))),\$A\$2:\$A\$8,0))

which needs to be confirmed with control+shift+enter, not just with enter.

Replies
3
Views
95
Replies
7
Views
187
Replies
3
Views
312
Replies
0
Views
125
Replies
5
Views
93

1,136,419
Messages
5,675,724
Members
419,584
Latest member
mrh8rr

### 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.

### Which adblocker are you using?

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

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