Index first 0 but after a given date

OilEconomist

Active Member
Joined
Dec 26, 2016
Messages
439
Office Version
  1. 2019
Platform
  1. Windows
Thanks in advance for any suggestions. I will provide feedback.

What function would be able to obtain the date from Row 1 for the first 0 or blank in Rows 2, 3, and 4 but based on dates equal to or greater than the respective cell in Column A.

Manually obtaining them, it would be as follows:
  • Row 2 for first zero or blank on or after 4/1/2019 would be 9/1/2019
  • Row 3 for first zero or blank on or after 3/1/2019 would be 3/1/2019
  • Row 4 for first zero or blank on or after 5/1/2019 would be 6/1/2019

Using the function INDEX( $D$1:$O$1, MATCH( 0, $D2:$O2, 0)) on any of the rows will always return 1/1/2019.


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1/1/2019[/TD]
[TD]2/1/2019[/TD]
[TD]3/1/2019[/TD]
[TD]4/1/2019[/TD]
[TD]5/1/2019[/TD]
[TD]6/1/2019[/TD]
[TD]7/1/2019[/TD]
[TD]8/1/2019[/TD]
[TD]9/1/2019[/TD]
[TD]10/1/2019[/TD]
[TD]11/1/2019[/TD]
[TD]12/1/2019[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]4/1/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]3/1/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]5/1/2019[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]88[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
How about


Excel 2013/2016
ABCDEFGHIJKLMNO
101/01/201902/01/201903/01/201904/01/201905/01/201906/01/201907/01/201908/01/201909/01/201910/01/201911/01/201912/01/2019
204/01/201909/01/2019548887
303/01/201908/01/2019000756700000
405/01/201906/01/201923882
Output
Cell Formulas
RangeFormula
C2{=INDEX($D$1:$O$1,MATCH(1,($D2:$O2=0)*($D$1:$O$1>$A2),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hello,

You could test the following Array Formula

Code:
=INDEX($D$1:$O$1,MIN(IF($D$1:$O$1>=A2,IF(D2:O2=0,COLUMN($D$1:$O$1))))-3)

Hope this will help
 
Upvote 0
Thanks to both of you Fluff and James 006. Both proposed solutions worked.

The only thing I changed is ">" to ">=" as if a 0 fell on that date in column A, I wanted to know how to use it. I will be using both formulas and at times using it with ">" or ">=".
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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