Find first entry with zero and return corresponding date

blue333

Board Regular
Joined
Mar 19, 2009
Messages
64
Hi

I am trying to write a formula that returns the date from a row that corresponds to the first cell in another row that is the first zero. The following example will help explain what I am mean.

[TABLE="width: 15"]
<tbody>[TR]
[TD]Dates
[/TD]
[TD]Column 1
[/TD]
[TD]Column 2
[/TD]
[TD]Column 3
[/TD]
[TD]Column 4
[/TD]
[/TR]
[TR]
[TD]Jan 1
[/TD]
[TD]4
[/TD]
[TD]1
[/TD]
[TD]9
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]Feb 1
[/TD]
[TD]5
[/TD]
[TD]0
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]Mar 1
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]7
[/TD]
[TD]0
[/TD]
[/TR]
[TR]
[TD]Apr 1
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[/TR]
</tbody>[/TABLE]

The expected results are as follows:
Column 1 - Mar 1
Column 2 - Feb 1
Column 3 - Apr 1
Column 4 - Mar 1

The values in columns 1 to 4 are not blank. There is a formula that returns a calculated value. I only care if the value is zero.

I thought that this match/index formula did the job

=INDEX($A$8:$A$184,MATCH(TRUE,INDEX((C8:C184=0),0,0)))

but it is always returning the last value (Apr 1).

Thanks in advance for your help.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi,

Not sure if I understand correctly:


Book1
ABCDEFGHIJ
1DatesColumn 1Column 2Column 3Column 4Results
21-Jan41931-Mar1-Feb1-Apr1-Mar
31-Feb5033
41-Mar0070
51-Apr0000
Sheet40
Cell Formulas
RangeFormula
G2=INDEX($A2:$A5,MATCH(0,B2:B5,0))


G2 formula copied across.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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