Find Date in rows was contain Text "1"

coolzsters

New Member
Joined
Jul 23, 2018
Messages
13
Dear all Master....

Example :

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]Items[/TD]
[TD]7/6/2018[/TD]
[TD]7/7/2018[/TD]
[TD]7/8/2018[/TD]
[TD]7/9/2018[/TD]
[TD]7/10/2018[/TD]
[TD]7/11/2018[/TD]
[TD]7/12/2018[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD]Bananas[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD="align: center"]?[/TD]
[/TR]
</tbody>[/TABLE]



I really need help, i want to find a Date in result column when found first "1" variables... :):confused::confused:
 

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.
In I2 and copy down:
Code:
=INDEX($B$1:$H$4,1,MATCH(1,$B2:$H2,0))
 
Upvote 0
another option: copy and paste ( ctrl+shift ENTER ) <enter>
Code:
=OFFSET(INDEX(B2:H2,MATCH(FALSE,ISBLANK(B2:H2),0)),ROW(A1)*-1,0)

drag formula down.</enter>
 
Last edited:
Upvote 0
another option: copy and paste ( ctrl+shift ENTER ) <enter>
Code:
=OFFSET(INDEX(B2:H2,MATCH(FALSE,ISBLANK(B2:H2),0)),ROW(A1)*-1,0)

drag formula down.</enter>
A few comments
1. Apart from requiring the additional CSE complication on entry, OFFSET is a volatile function so could potentially impact the sheet's performance.
2. It is not robust. For example, after the sheet is set up with your formula, insert a new row 1 & look what happens.
3. If the 1's and blanks in the data happen to be populated by a formula, your formula will always return the date from column B.


One further comment, JoeMo's formula can be simplified a little to
Code:
=INDEX(B$1:H$1,MATCH(1,B2:H2,0))


BTW, coolzsters, welcome to the MrExcel board!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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