Lookup Next Available Date

David1976

New Member
Joined
Nov 15, 2012
Messages
7
Hello,
I'm sure this should be very simple but I can't seem to make it work. I've tried a few vlookups & index/matches but can't get it right.
I need to scan down column K to find the first value greater than zero, then return the value in that row from column B.
When I try vlookup, it seems to only return the value from the top row in column B.
B is Date, K is Available Stops.
[TABLE="width: 964"]
<tbody>[TR]
[TD]Route
[/TD]
[TD]Date
[/TD]
[TD]Day
[/TD]
[TD]Booked.Stops
[/TD]
[TD]Max.Stops
[/TD]
[TD]Booked.Pieces
[/TD]
[TD]Max.Pieces
[/TD]
[TD]Booked.Dollars
[/TD]
[TD]Remaining.Stops
[/TD]
[TD]Remaining.Pieces
[/TD]
[TD]Available.Stops
[/TD]
[/TR]
[TR]
[TD]DACAL
[/TD]
[TD="align: right"]1
[/TD]
[TD]Thu
[/TD]
[TD="align: right"]8
[/TD]
[TD="align: right"]8
[/TD]
[TD="align: right"]28
[/TD]
[TD="align: right"]40
[/TD]
[TD="align: right"]9161
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12
[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]DACAL
[/TD]
[TD="align: right"]2
[/TD]
[TD]Fri
[/TD]
[TD="align: right"]32
[/TD]
[TD="align: right"]34
[/TD]
[TD="align: right"]120
[/TD]
[TD="align: right"]160
[/TD]
[TD="align: right"]58648
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"]40
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]DACAL
[/TD]
[TD="align: right"]3
[/TD]
[TD]Sat
[/TD]
[TD="align: right"]34
[/TD]
[TD="align: right"]34
[/TD]
[TD="align: right"]127
[/TD]
[TD="align: right"]160
[/TD]
[TD="align: right"]45871
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]33
[/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
 
Not quite, Aladin. That returns the value 4, the first value that is greater than zero.
I'm looking to count the number of zeros before the 4.
I have tried this but it doesn't work, it returns a value of 1. =(COUNTIF(K2:K32,">0")>0)+0

Control+shift+enter, not just enter:

=SUM(ISNUMBER(K2:INDEX(K2:K200,MATCH(1,IF(ISNUMBER(K2:K200),IF(K2:K200>0,1)),0)-1))+0)
 
Upvote 0
That's got it! Thanks, I'll keep you posted on what I plan to do with this... it's actually quite cool :)
 
Upvote 0

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